Class: FactoryBot::Configuration Private
- Inherits:
-
Object
- Object
- FactoryBot::Configuration
- Defined in:
- lib/factory_bot/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
- #callback_names ⇒ Object readonly private
- #factories ⇒ Object readonly private
- #inline_sequences ⇒ Object readonly private
- #sequences ⇒ Object readonly private
- #strategies ⇒ Object readonly private
- #traits ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
private
A new instance of Configuration.
- #initialize_with(&block) ⇒ Object private
Constructor Details
#initialize ⇒ Configuration
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 Configuration.
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/factory_bot/configuration.rb', line 13 def initialize @factories = Decorator::DisallowsDuplicatesRegistry.new(Registry.new("Factory")) @sequences = Decorator::DisallowsDuplicatesRegistry.new(Registry.new("Sequence")) @traits = Decorator::DisallowsDuplicatesRegistry.new(Registry.new("Trait")) @strategies = Registry.new("Strategy") @callback_names = Set.new @definition = Definition.new(:configuration) @inline_sequences = [] to_create(&:save!) initialize_with { new } end |
Instance Attribute Details
#callback_names ⇒ Object (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_bot/configuration.rb', line 4 def callback_names @callback_names end |
#factories ⇒ Object (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_bot/configuration.rb', line 4 def factories @factories end |
#inline_sequences ⇒ Object (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_bot/configuration.rb', line 4 def inline_sequences @inline_sequences end |
#sequences ⇒ Object (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_bot/configuration.rb', line 4 def sequences @sequences end |
#strategies ⇒ Object (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_bot/configuration.rb', line 4 def strategies @strategies end |
#traits ⇒ Object (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_bot/configuration.rb', line 4 def traits @traits end |
Instance Method Details
#initialize_with(&block) ⇒ Object
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.
29 30 31 |
# File 'lib/factory_bot/configuration.rb', line 29 def initialize_with(&block) @definition.define_constructor(&block) end |