Class: FactoryGirl::Declaration Private

Inherits:
Object
  • Object
show all
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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Direct Known Subclasses

Association, Dynamic, Implicit, Static

Defined Under Namespace

Classes: Association, Dynamic, Implicit, Static

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, ignored = false) ⇒ Declaration

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Declaration.



11
12
13
14
# File 'lib/factory_girl/declaration.rb', line 11

def initialize(name, ignored = false)
  @name    = name
  @ignored = ignored
end

Instance Attribute Details

#nameObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
# File 'lib/factory_girl/declaration.rb', line 9

def name
  @name
end

Instance Method Details

#to_attributesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
# File 'lib/factory_girl/declaration.rb', line 16

def to_attributes
  build
end