Class: PanStuff::Serializer::SmartHashSerializer

Inherits:
HashSerializer show all
Defined in:
lib/pan_stuff/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.



6
7
8
9
10
11
12
13
14
# File 'lib/pan_stuff/serializer/smart_hash_serializer.rb', line 6

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