Class: FactoryGirl::DefinitionHierarchy

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

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) build_from_definition(definition)



15
16
17
18
19
# File 'lib/factory_girl/definition_hierarchy.rb', line 15

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

Instance Method Details

- (Object) callbacks



3
4
5
# File 'lib/factory_girl/definition_hierarchy.rb', line 3

def callbacks
  FactoryGirl.callbacks
end

- (Object) constructor



7
8
9
# File 'lib/factory_girl/definition_hierarchy.rb', line 7

def constructor
  FactoryGirl.constructor
end

- (Object) to_create



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

def to_create
  FactoryGirl.to_create
end