Module: RestPack::Serializer::ClassMethods
- Defined in:
- lib/restpack_serializer/serializable.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#model_class ⇒ Object
Returns the value of attribute model_class.
Instance Method Summary collapse
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
64 65 66 |
# File 'lib/restpack_serializer/serializable.rb', line 64 def key @key end |
#model_class ⇒ Object
Returns the value of attribute model_class.
64 65 66 |
# File 'lib/restpack_serializer/serializable.rb', line 64 def model_class @model_class end |
Instance Method Details
#as_json(model, context = {}) ⇒ Object
65 66 67 |
# File 'lib/restpack_serializer/serializable.rb', line 65 def as_json(model, context = {}) new.as_json(model, context) end |