Class: FactoryGirl::Configuration Private
- Inherits:
-
Object
- Object
- FactoryGirl::Configuration
- Defined in:
- lib/factory_girl/configuration.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.
Instance Attribute Summary (collapse)
- - (Object) callback_names readonly private
- - (Object) factories readonly private
- - (Object) sequences readonly private
- - (Object) strategies readonly private
- - (Object) traits readonly private
Instance Method Summary (collapse)
-
- (Configuration) initialize
constructor
private
A new instance of Configuration.
- - (Object) initialize_with(&block) private
Constructor Details
- (Configuration) initialize
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.
A new instance of Configuration
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/factory_girl/configuration.rb', line 6 def initialize @factories = DisallowsDuplicatesRegistry.new(Registry.new('Factory')) @sequences = DisallowsDuplicatesRegistry.new(Registry.new('Sequence')) @traits = DisallowsDuplicatesRegistry.new(Registry.new('Trait')) @strategies = Registry.new('Strategy') @callback_names = Set.new @definition = Definition.new to_create {|instance| instance.save! } initialize_with { new } end |
Instance Attribute Details
- (Object) callback_names (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.
4 5 6 |
# File 'lib/factory_girl/configuration.rb', line 4 def callback_names @callback_names end |
- (Object) factories (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.
4 5 6 |
# File 'lib/factory_girl/configuration.rb', line 4 def factories @factories end |
- (Object) sequences (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.
4 5 6 |
# File 'lib/factory_girl/configuration.rb', line 4 def sequences @sequences end |
- (Object) strategies (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.
4 5 6 |
# File 'lib/factory_girl/configuration.rb', line 4 def strategies @strategies end |
- (Object) traits (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.
4 5 6 |
# File 'lib/factory_girl/configuration.rb', line 4 def traits @traits end |
Instance Method Details
- (Object) initialize_with(&block)
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.
20 21 22 |
# File 'lib/factory_girl/configuration.rb', line 20 def initialize_with(&block) @definition.define_constructor(&block) end |