module PragmaticSerializer::ResourceInterface::ClassMethods
Public Instance Methods
resource(resource)
click to toggle source
initialize new resource serializer
this method exist for consistency purpose with CollectionInterface
# File lib/pragmatic_serializer/resource_interface.rb, line 7 def resource(resource) self.new(resource) end
resource_hash(resource, method=:as_json)
click to toggle source
# File lib/pragmatic_serializer/resource_interface.rb, line 11 def resource_hash(resource, method=:as_json) resource(resource).send(method) end