Module: SchemaSerializer::Serializable

Defined in:
lib/schema_serializer/serializable.rb

Instance Method Summary collapse

Instance Method Details

#serializer(*args) ⇒ Object



3
4
5
6
7
# File 'lib/schema_serializer/serializable.rb', line 3

def serializer(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  klass = args.first || options[:class]
  (klass || serializer_class || SchemaSerializer).new(self, options)
end