Sha256: bb99652d1f95578fc1567adecfd6169a098af20b904f40aaa67fec65ade61f37
Contents?: true
Size: 728 Bytes
Versions: 5
Compression:
Stored size: 728 Bytes
Contents
# frozen_string_literal: true module BrightSerializer module Extensions module Instrumentation SERIALIZABLE_HASH_NOTIFICATION = 'render.bright_serializer.serializable_hash' SERIALIZED_JSON_NOTIFICATION = 'render.bright_serializer.serializable_json' def serializable_hash ActiveSupport::Notifications.instrument(SERIALIZABLE_HASH_NOTIFICATION, serializer: self.class.name) do super end end alias to_hash serializable_hash def serializable_json(*_args) ActiveSupport::Notifications.instrument(SERIALIZED_JSON_NOTIFICATION, serializer: self.class.name) do super end end alias to_json serializable_json end end end
Version data entries
5 entries across 5 versions & 1 rubygems