Module: RestPack::Serializer::ClassMethods

Defined in:
lib/restpack_serializer/serializable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key.



72
73
74
# File 'lib/restpack_serializer/serializable.rb', line 72

def key
  @key
end

#model_classObject

Returns the value of attribute model_class.



72
73
74
# File 'lib/restpack_serializer/serializable.rb', line 72

def model_class
  @model_class
end

Instance Method Details

#as_json(model, context = {}) ⇒ Object



73
74
75
# File 'lib/restpack_serializer/serializable.rb', line 73

def as_json(model, context = {})
  new.as_json(model, context)
end