Class: Consently::Configuration::Scope

Inherits:
Object
  • Object
show all
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

Constructor Details

#initializeScope

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, **options)
  provider = Providers::Base.build(key, **options)
  @tags[provider.key] = provider
end

#tagsObject



177
178
179
# File 'lib/consently/configuration.rb', line 177

def tags
  @tags
end