Module: Influxer::Scoping::CurrentScope

Included in:
ClassMethods
Defined in:
lib/influxer/metrics/scoping/current_scope.rb,
lib/influxer/metrics/scoping/old_current_scope.rb

Overview

Clone of current_scope methods for older versions of ActiveModel

Defined Under Namespace

Classes: ScopeRegistry

Instance Method Summary collapse

Instance Method Details

#current_scopeObject

Clone of current_scope methods for newer versions of ActiveModel



9
10
11
# File 'lib/influxer/metrics/scoping/current_scope.rb', line 9

def current_scope
  ScopeRegistry.value_for(:current_scope, name)
end

#current_scope=(scope) ⇒ Object



13
14
15
# File 'lib/influxer/metrics/scoping/current_scope.rb', line 13

def current_scope=(scope)
  ScopeRegistry.set_value_for(:current_scope, name, scope)
end