Class: FactoryBot::DefinitionHierarchy

Inherits:
Object
  • Object
show all
Defined in:
lib/factory_bot/definition_hierarchy.rb

Class Method Summary collapse

Class Method Details

.build_from_definition(definition) ⇒ Object



5
6
7
8
9
# File 'lib/factory_bot/definition_hierarchy.rb', line 5

def self.build_from_definition(definition)
  build_to_create(&definition.to_create)
  build_constructor(&definition.constructor)
  add_callbacks definition.callbacks
end