Class: Consently::Configuration::Scope
- Inherits:
-
Object
- Object
- Consently::Configuration::Scope
- Defined in:
- lib/consently/configuration.rb
Overview
A named bundle of tags. Same API as the top-level tag, which is what
makes the block form read the way it does.
Instance Method Summary collapse
-
#initialize ⇒ Scope
constructor
A new instance of Scope.
- #tag(key, **options) ⇒ Object
- #tags ⇒ Object
Constructor Details
#initialize ⇒ Scope
Returns a new instance of Scope.
136 137 138 |
# File 'lib/consently/configuration.rb', line 136 def initialize @tags = {} end |
Instance Method Details
#tag(key, **options) ⇒ Object
140 141 142 143 |
# File 'lib/consently/configuration.rb', line 140 def tag(key, **) provider = Providers::Base.build(key, **) @tags[provider.key] = provider end |
#tags ⇒ Object
145 146 147 |
# File 'lib/consently/configuration.rb', line 145 def @tags end |