Module: MinceDataModel
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/mince_data_model.rb,
lib/mince_data_model/version.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- VERSION =
"1.1.1"
Instance Method Summary collapse
- #add_to_data_store ⇒ Object
- #data_collection ⇒ Object
- #data_fields ⇒ Object
- #data_store ⇒ Object
- #initialize(model) ⇒ Object
- #replace_in_data_store ⇒ Object
Instance Method Details
#add_to_data_store ⇒ Object
149 150 151 |
# File 'lib/mince_data_model.rb', line 149 def add_to_data_store data_store.instance.add(data_collection, attributes) end |
#data_collection ⇒ Object
145 146 147 |
# File 'lib/mince_data_model.rb', line 145 def data_collection self.class.data_collection end |
#data_fields ⇒ Object
141 142 143 |
# File 'lib/mince_data_model.rb', line 141 def data_fields self.class.data_fields end |
#data_store ⇒ Object
137 138 139 |
# File 'lib/mince_data_model.rb', line 137 def data_store self.class.data_store end |
#initialize(model) ⇒ Object
131 132 133 134 135 |
# File 'lib/mince_data_model.rb', line 131 def initialize(model) @model = model set_data_field_values set_id end |
#replace_in_data_store ⇒ Object
153 154 155 |
# File 'lib/mince_data_model.rb', line 153 def replace_in_data_store data_store.instance.replace(data_collection, attributes) end |