Module: Oshpark::Model::ClassMethods
- Defined in:
- lib/oshpark/model.rb
Instance Method Summary collapse
Instance Method Details
#attrs ⇒ Object
35 36 37 |
# File 'lib/oshpark/model.rb', line 35 def attrs [] end |
#from_json(json) ⇒ Object
30 31 32 33 |
# File 'lib/oshpark/model.rb', line 30 def from_json json model = self.new json model end |
#object_name ⇒ Object
39 40 41 |
# File 'lib/oshpark/model.rb', line 39 def object_name self.name.split('::').last.downcase end |
#object_names ⇒ Object
43 44 45 |
# File 'lib/oshpark/model.rb', line 43 def object_names "#{object_name}s" end |