class Aliyun::Log::ScopeRegistry

Public Class Methods

new() click to toggle source
# File lib/aliyun/log/record/scope_registry.rb, line 26
def initialize
  @registry = Hash.new { |hash, key| hash[key] = {} }
end

Public Instance Methods

set_value_for(scope_type, model, value) click to toggle source

Sets the value for a given scope_type and model.

# File lib/aliyun/log/record/scope_registry.rb, line 35
def set_value_for(scope_type, model, value)
  @registry[scope_type][model.name] = value
end
value_for(scope_type, model) click to toggle source
# File lib/aliyun/log/record/scope_registry.rb, line 30
def value_for(scope_type, model)
  @registry[scope_type][model.name]
end