Module: Restorm::Model::Attributes::ClassMethods
- Defined in:
- lib/restorm/model/attributes.rb
Instance Method Summary collapse
-
#attributes(*attributes) ⇒ Object
Define the attributes that will be used to track dirty attributes and validations.
-
#store_metadata(value = nil) ⇒ Object
Define the accessor in which the API response metadata (obtained from the parsing middleware) will be stored.
-
#store_response_errors(value = nil) ⇒ Object
Define the accessor in which the API response errors (obtained from the parsing middleware) will be stored.
Instance Method Details
#attributes(*attributes) ⇒ Object
Define the attributes that will be used to track dirty attributes and validations
255 256 257 258 259 |
# File 'lib/restorm/model/attributes.rb', line 255 def attributes(*attributes) attribute_methods_mutex.synchronize do define_attribute_methods attributes end end |
#store_metadata(value = nil) ⇒ Object
Define the accessor in which the API response metadata (obtained from the parsing middleware) will be stored
285 286 287 |
# File 'lib/restorm/model/attributes.rb', line 285 def (value = nil) store_restorm_data(:metadata, value) end |
#store_response_errors(value = nil) ⇒ Object
Define the accessor in which the API response errors (obtained from the parsing middleware) will be stored
271 272 273 |
# File 'lib/restorm/model/attributes.rb', line 271 def store_response_errors(value = nil) store_restorm_data(:response_errors, value) end |