Class: ActiveFields::Casters::EnumCaster

Inherits:
BaseCaster
  • Object
show all
Defined in:
lib/active_fields/casters/enum_caster.rb

Direct Known Subclasses

EnumArrayCaster

Instance Attribute Summary

Attributes inherited from BaseCaster

#options

Instance Method Summary collapse

Methods inherited from BaseCaster

#initialize

Constructor Details

This class inherits a constructor from ActiveFields::Casters::BaseCaster

Instance Method Details

#deserialize(value) ⇒ Object



10
11
12
# File 'lib/active_fields/casters/enum_caster.rb', line 10

def deserialize(value)
  cast(value)
end

#serialize(value) ⇒ Object



6
7
8
# File 'lib/active_fields/casters/enum_caster.rb', line 6

def serialize(value)
  cast(value)
end