Class: Hypermodel::Serializer
- Inherits:
-
Object
- Object
- Hypermodel::Serializer
- Defined in:
- lib/hypermodel/serializer.rb
Overview
Private: Responsible for instantiating the correct serializer for a given record. Right now only works with Mongoid.
Class Method Summary collapse
-
.build(record) ⇒ Object
Public: Returns a matching Serializer inspecting the ORM of the record.
Class Method Details
.build(record) ⇒ Object
Public: Returns a matching Serializer inspecting the ORM of the record.
9 10 11 |
# File 'lib/hypermodel/serializer.rb', line 9 def self.build(record) Serializers::Mongoid.new(record) end |