Class: Serega::SeregaPlugins::ContextMetadata::ContextMetadataConfig
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::ContextMetadata::ContextMetadataConfig
- Defined in:
- lib/serega/plugins/context_metadata/context_metadata.rb
Overview
Config for context_metadata
plugin
Instance Attribute Summary collapse
-
#opts ⇒ Hash
readonly
Context_metadata options.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Serega::SeregaPlugins::ContextMetadata::ContextMetadataConfig
constructor
Initializes context_metadata config object.
-
#key ⇒ Object
Key that should be used to define metadata.
-
#key=(new_key) ⇒ Symbol
Sets key that should be used to define metadata.
Constructor Details
#initialize(opts) ⇒ Serega::SeregaPlugins::ContextMetadata::ContextMetadataConfig
Initializes context_metadata config object
85 86 87 |
# File 'lib/serega/plugins/context_metadata/context_metadata.rb', line 85 def initialize(opts) @opts = opts end |
Instance Attribute Details
#opts ⇒ Hash (readonly)
Returns context_metadata options.
77 78 79 |
# File 'lib/serega/plugins/context_metadata/context_metadata.rb', line 77 def opts @opts end |
Instance Method Details
#key ⇒ Object
Key that should be used to define metadata
90 91 92 |
# File 'lib/serega/plugins/context_metadata/context_metadata.rb', line 90 def key opts.fetch(:key) end |
#key=(new_key) ⇒ Symbol
Sets key that should be used to define metadata
99 100 101 |
# File 'lib/serega/plugins/context_metadata/context_metadata.rb', line 99 def key=(new_key) opts[:key] = new_key end |