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
94 95 96 |
# File 'lib/serega/plugins/context_metadata/context_metadata.rb', line 94 def initialize(opts) @opts = opts end |
Instance Attribute Details
#opts ⇒ Hash (readonly)
86 87 88 |
# File 'lib/serega/plugins/context_metadata/context_metadata.rb', line 86 def opts @opts end |
Instance Method Details
#key ⇒ Object
Key that should be used to define metadata
99 100 101 |
# File 'lib/serega/plugins/context_metadata/context_metadata.rb', line 99 def key opts.fetch(:key) end |
#key=(new_key) ⇒ Symbol
Sets key that should be used to define metadata
108 109 110 |
# File 'lib/serega/plugins/context_metadata/context_metadata.rb', line 108 def key=(new_key) opts[:key] = new_key end |