Class: PDC::Resource::ScopeRegistry
- Inherits:
-
Object
- Object
- PDC::Resource::ScopeRegistry
- Extended by:
- PerThreadRegistry
- Defined in:
- lib/pdc/resource/scope_registry.rb
Instance Method Summary collapse
-
#initialize ⇒ ScopeRegistry
constructor
A new instance of ScopeRegistry.
- #set_value_for(scope_type, variable_name, value) ⇒ Object
- #value_for(scope_type, variable_name) ⇒ Object
Methods included from PerThreadRegistry
Constructor Details
#initialize ⇒ ScopeRegistry
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 |