Module: Serega::Plugins::ContextMetadata::InstanceMethods
- Defined in:
- lib/serega/plugins/context_metadata/context_metadata.rb
Instance Method Summary collapse
Instance Method Details
#to_h(object, **opts) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/serega/plugins/context_metadata/context_metadata.rb', line 29 def to_h(object, **opts) = self.class.config[:context_metadata][:key] = opts[] if && !.is_a?(Hash) raise Serega::Error, "Option :#{} must be a Hash, but #{.class} was given" end super end |