Class: FactoryBot::Declaration Private

Inherits:
Object
  • Object
show all
Defined in:
lib/factory_bot/declaration.rb,
lib/factory_bot/declaration/dynamic.rb,
lib/factory_bot/declaration/implicit.rb,
lib/factory_bot/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

Defined Under Namespace

Classes: Association, Dynamic, Implicit

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.



10
11
12
13
# File 'lib/factory_bot/declaration.rb', line 10

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.



8
9
10
# File 'lib/factory_bot/declaration.rb', line 8

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.



15
16
17
# File 'lib/factory_bot/declaration.rb', line 15

def to_attributes
  build
end