Class: PDC::Resource::ScopeRegistry

Inherits:
Object
  • Object
show all
Extended by:
PerThreadRegistry
Defined in:
lib/pdc/resource/scope_registry.rb

Instance Method Summary collapse

Methods included from PerThreadRegistry

extended, instance

Constructor Details

#initializeScopeRegistry

Returns a new instance of ScopeRegistry.



7
8
9
# File 'lib/pdc/resource/scope_registry.rb', line 7

def initialize
  @store = Hash.new { |hash, key| hash[key] = {} }
end

Instance Method Details

#set_value_for(scope_type, variable_name, value) ⇒ Object



15
16
17
# File 'lib/pdc/resource/scope_registry.rb', line 15

def set_value_for(scope_type, variable_name, value)
  @store[scope_type][variable_name] = value
end

#value_for(scope_type, variable_name) ⇒ Object



11
12
13
# File 'lib/pdc/resource/scope_registry.rb', line 11

def value_for(scope_type, variable_name)
  @store[scope_type][variable_name]
end