Class: ModelFactory::Wrapper
- Inherits:
-
Object
- Object
- ModelFactory::Wrapper
- Defined in:
- lib/modelfactory.rb
Overview
Singleton Factory wrapper class.
Instance Method Summary collapse
-
#initialize(&block) ⇒ Wrapper
constructor
Create a new FactoryConfiguration with the given block.
-
#wrap(klass) ⇒ Object
Wraps a given class in a configured Factory instance.
Constructor Details
#initialize(&block) ⇒ Wrapper
Create a new FactoryConfiguration with the given block.
35 36 37 38 |
# File 'lib/modelfactory.rb', line 35 def initialize(&block) @config = FactoryConfiguration.new(&block) @factory = {} end |