Class: FormObject::Store
- Inherits:
-
Object
- Object
- FormObject::Store
- Includes:
- Singleton
- Defined in:
- lib/form_object/store.rb
Instance Method Summary collapse
Instance Method Details
#find(critery = {}) ⇒ Object
17 18 19 |
# File 'lib/form_object/store.rb', line 17 def find(critery = {}) storage.select{|mapping_info| mapping_info.match?(critery)} end |
#map_for_model(form, model, options = {}) ⇒ Object
11 12 13 14 15 |
# File 'lib/form_object/store.rb', line 11 def map_for_model( form, model, = {}) form_name = retrive_form_name(form, .delete(:as)) storage << FormObject::Base::MappingInformation.new(form, model, form_name, ) include_integration( model ) end |
#storage ⇒ Object
7 8 9 |
# File 'lib/form_object/store.rb', line 7 def storage @storage ||= Set.new end |