Class: FactoryBotFactory::Config
- Inherits:
-
Object
- Object
- FactoryBotFactory::Config
- Defined in:
- lib/factory_bot_factory/config.rb
Constant Summary collapse
- DEFAULT_CONVERTERS =
{ hash_converter: Converters::HashConverter, string_converter: Converters::StringConverter, numertic_converter: Converters::NumericConverter, open_struct_converter: Converters::HashConverter, nil_converter: Converters::NilConverter }
Instance Attribute Summary collapse
-
#hash_converter ⇒ Object
Returns the value of attribute hash_converter.
-
#nil_converter ⇒ Object
Returns the value of attribute nil_converter.
-
#numertic_converter ⇒ Object
Returns the value of attribute numertic_converter.
-
#open_struct_converter ⇒ Object
Returns the value of attribute open_struct_converter.
-
#string_converter ⇒ Object
Returns the value of attribute string_converter.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
13 14 15 16 |
# File 'lib/factory_bot_factory/config.rb', line 13 def initialize( = {}) = DEFAULT_CONVERTERS.merge() .each { |k, v| instance_variable_set(:"@#{k}", v) } end |
Instance Attribute Details
#hash_converter ⇒ Object
Returns the value of attribute hash_converter.
11 12 13 |
# File 'lib/factory_bot_factory/config.rb', line 11 def hash_converter @hash_converter end |
#nil_converter ⇒ Object
Returns the value of attribute nil_converter.
11 12 13 |
# File 'lib/factory_bot_factory/config.rb', line 11 def nil_converter @nil_converter end |
#numertic_converter ⇒ Object
Returns the value of attribute numertic_converter.
11 12 13 |
# File 'lib/factory_bot_factory/config.rb', line 11 def numertic_converter @numertic_converter end |
#open_struct_converter ⇒ Object
Returns the value of attribute open_struct_converter.
11 12 13 |
# File 'lib/factory_bot_factory/config.rb', line 11 def open_struct_converter @open_struct_converter end |
#string_converter ⇒ Object
Returns the value of attribute string_converter.
11 12 13 |
# File 'lib/factory_bot_factory/config.rb', line 11 def string_converter @string_converter end |