Class: PiResources::Serializer::SmartHashSerializer

Inherits:
HashSerializer show all
Defined in:
lib/pi_resources/serializer/smart_hash_serializer.rb

Constant Summary

Constants included from Base

Base::TRANSFORMS_MAPPING

Instance Attribute Summary

Attributes inherited from HashSerializer

#hash, #message, #meta, #root

Instance Method Summary collapse

Methods inherited from HashSerializer

#data

Methods included from Base

#as_json, #run_key_transform!, #serializable_hash!, #to_h

Constructor Details

#initialize(resource, meta: nil, message: nil, context: nil, root: true) ⇒ SmartHashSerializer

Returns a new instance of SmartHashSerializer.



9
10
11
12
13
14
15
16
17
# File 'lib/pi_resources/serializer/smart_hash_serializer.rb', line 9

def initialize(resource, meta: nil, message: nil, context: nil, root: true)
  super(
    check_type(resource),
    meta:    meta,
    message: message,
    context: context,
    root:    root,
  )
end