Module: Lycra::Serializer::Model::ClassMethods

Defined in:
lib/lycra/serializer/model.rb

Instance Method Summary collapse

Instance Method Details

#serializer(klass = nil) ⇒ Object



10
11
12
13
# File 'lib/lycra/serializer/model.rb', line 10

def serializer(klass=nil)
  @_lycra_serializer = klass if klass
  @_lycra_serializer || ("#{name}Serializer".constantize rescue nil)
end

#serializer=(klass) ⇒ Object



15
16
17
# File 'lib/lycra/serializer/model.rb', line 15

def serializer=(klass)
  serializer klass
end