@api private
# File lib/factory_girl/attribute_list.rb, line 6 def initialize(name = nil, attributes = []) @name = name @attributes = attributes end
# File lib/factory_girl/attribute_list.rb, line 38 def apply_attributes(attributes_to_apply) attributes_to_apply.each {|attribute| add_attribute(attribute) } end
# File lib/factory_girl/attribute_list.rb, line 26 def associations AttributeList.new(@name, select(&:association?)) end
# File lib/factory_girl/attribute_list.rb, line 11 def define_attribute(attribute) ensure_attribute_not_self_referencing! attribute ensure_attribute_not_defined! attribute add_attribute attribute end
# File lib/factory_girl/attribute_list.rb, line 18 def each(&block) @attributes.each(&block) end
# File lib/factory_girl/attribute_list.rb, line 30 def ignored AttributeList.new(@name, select(&:ignored)) end
# File lib/factory_girl/attribute_list.rb, line 22 def names map(&:name) end
# File lib/factory_girl/attribute_list.rb, line 34 def non_ignored AttributeList.new(@name, reject(&:ignored)) end