Class: FactoryGirl::Declaration
- Inherits:
-
Object
- Object
- FactoryGirl::Declaration
- Defined in:
- lib/factory_girl/declaration.rb,
lib/factory_girl/declaration/static.rb,
lib/factory_girl/declaration/dynamic.rb,
lib/factory_girl/declaration/implicit.rb,
lib/factory_girl/declaration/association.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Association, Dynamic, Implicit, Static
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #ignore ⇒ Object
-
#initialize(name, ignored = false) ⇒ Declaration
constructor
A new instance of Declaration.
- #to_attributes ⇒ Object
Constructor Details
#initialize(name, ignored = false) ⇒ Declaration
Returns a new instance of Declaration.
10 11 12 13 |
# File 'lib/factory_girl/declaration.rb', line 10 def initialize(name, ignored = false) @name = name @ignored = ignored end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/factory_girl/declaration.rb', line 8 def name @name end |
Instance Method Details
#ignore ⇒ Object
15 16 17 18 |
# File 'lib/factory_girl/declaration.rb', line 15 def ignore $stderr.puts "DEPRECATION WARNING: Use ignore block syntax instead of calling #ignore" @ignored = true end |
#to_attributes ⇒ Object
20 21 22 |
# File 'lib/factory_girl/declaration.rb', line 20 def to_attributes build end |