Module: FactoryBotFactory
- Defined in:
- lib/factory_bot_factory.rb,
lib/factory_bot_factory/base.rb,
lib/factory_bot_factory/config.rb,
lib/factory_bot_factory/logger.rb,
lib/factory_bot_factory/version.rb,
lib/factory_bot_factory/attribute.rb,
lib/factory_bot_factory/file_writer.rb,
lib/factory_bot_factory/line_writer.rb,
lib/factory_bot_factory/factories/base_factory.rb,
lib/factory_bot_factory/factories/hash_factory.rb,
lib/factory_bot_factory/factories/model_factory.rb,
lib/factory_bot_factory/converters/nil_converter.rb,
lib/factory_bot_factory/converters/hash_converter.rb,
lib/factory_bot_factory/converters/string_converter.rb,
lib/factory_bot_factory/converters/numeric_converter.rb,
lib/factory_bot_factory/factories/open_struct_factory.rb,
lib/factory_bot_factory/converters/data_time_converter.rb,
lib/factory_bot_factory/factories/active_record_factory.rb
Defined Under Namespace
Modules: Converters
Classes: ActiveRecordFactory, Attribute, Base, BaseFactory, Config, Error, FactoryExistsError, FileExistsError, FileWriter, HashFactory, LineWriter, Logger, ModelFactory, NestedToDeepError, OpenStructFactory
Constant Summary
collapse
- VERSION =
"1.2.0"
Class Method Summary
collapse
Class Method Details
.build(data, options = {}) ⇒ Object
21
22
23
24
25
|
# File 'lib/factory_bot_factory.rb', line 21
def build(data, options = {})
configure
Base.build(data, options)
end
|
.config ⇒ Object
32
33
34
|
# File 'lib/factory_bot_factory.rb', line 32
def config
@_config ||= Config.new
end
|
27
28
29
30
|
# File 'lib/factory_bot_factory.rb', line 27
def configure
yield config if block_given?
config
end
|