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.
168 169 170 |
# File 'lib/consently/configuration.rb', line 168 def initialize @tags = {} end |
Instance Method Details
#tag(key, **options) ⇒ Object
172 173 174 175 |
# File 'lib/consently/configuration.rb', line 172 def tag(key, **) provider = Providers::Base.build(key, **) @tags[provider.key] = provider end |
#tags ⇒ Object
177 178 179 |
# File 'lib/consently/configuration.rb', line 177 def @tags end |