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.



64
65
66
# File 'lib/restpack_serializer/serializable.rb', line 64

def key
  @key
end

#model_classObject

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