Class: JSONApi::Deserializer::Record
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- JSONApi::Deserializer::Record
- Includes:
- Hashie::Extensions::DeepFetch, Hashie::Extensions::IndifferentAccess, Hashie::Extensions::MethodAccess
- Defined in:
- lib/jsonapi_deserializer.rb
Instance Method Summary collapse
-
#initialize(source_hash = nil, default = nil, &blk) ⇒ Record
constructor
A new instance of Record.
Constructor Details
#initialize(source_hash = nil, default = nil, &blk) ⇒ Record
Returns a new instance of Record.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/jsonapi_deserializer.rb', line 29 def initialize(source_hash = nil, default = nil, &blk) if source_hash[:id] source_hash[:id] = source_hash[:id].to_s end if source_hash[:lid] source_hash[:lid] = source_hash[:lid].to_s end super end |