Class: ActiveFields::Casters::DecimalCaster
- Inherits:
-
BaseCaster
- Object
- BaseCaster
- ActiveFields::Casters::DecimalCaster
show all
- Defined in:
- lib/active_fields/casters/decimal_caster.rb
Instance Attribute Summary
Attributes inherited from BaseCaster
#options
Instance Method Summary
collapse
Methods inherited from BaseCaster
#initialize
Instance Method Details
#deserialize(value) ⇒ Object
11
12
13
|
# File 'lib/active_fields/casters/decimal_caster.rb', line 11
def deserialize(value)
cast(value)
end
|
#serialize(value) ⇒ Object
6
7
8
9
|
# File 'lib/active_fields/casters/decimal_caster.rb', line 6
def serialize(value)
cast(value)&.to_s
end
|