Class: Persistors::StoreFactory
- Defined in:
- lib/volt/models/persistors/store_factory.rb
Instance Method Summary collapse
-
#initialize(tasks) ⇒ StoreFactory
constructor
A new instance of StoreFactory.
- #new(model) ⇒ Object
Constructor Details
#initialize(tasks) ⇒ StoreFactory
Returns a new instance of StoreFactory.
3 4 5 |
# File 'lib/volt/models/persistors/store_factory.rb', line 3 def initialize(tasks) @tasks = tasks end |
Instance Method Details
#new(model) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/volt/models/persistors/store_factory.rb', line 7 def new(model) if model.is_a?(ArrayModel) ArrayStore.new(model, @tasks) else ModelStore.new(model, @tasks) end end |