Class: IknowParams::Serializer::Timezone
- Inherits:
-
IknowParams::Serializer
- Object
- IknowParams::Serializer
- IknowParams::Serializer::Timezone
- Defined in:
- lib/iknow_params/serializer.rb
Instance Attribute Summary
Attributes inherited from IknowParams::Serializer
Instance Method Summary collapse
- #dump(val, json: nil) ⇒ Object
-
#initialize ⇒ Timezone
constructor
A new instance of Timezone.
- #load(str) ⇒ Object
Methods inherited from IknowParams::Serializer
for, for!, json_value?, #matches_type!, #matches_type?, singleton
Constructor Details
#initialize ⇒ Timezone
Returns a new instance of Timezone.
219 220 221 |
# File 'lib/iknow_params/serializer.rb', line 219 def initialize super(::TZInfo::Timezone) end |
Instance Method Details
#dump(val, json: nil) ⇒ Object
229 230 231 232 |
# File 'lib/iknow_params/serializer.rb', line 229 def dump(val, json: nil) matches_type!(val) val.identifier end |