Class: ConfigManager::ToggleIdentityMap
- Inherits:
-
Object
- Object
- ConfigManager::ToggleIdentityMap
- Defined in:
- lib/config_manager/toggle_identity_map.rb
Class Method Summary collapse
Class Method Details
.id_map ⇒ Object
10 11 12 |
# File 'lib/config_manager/toggle_identity_map.rb', line 10 def id_map @thread_map[Thread.current.object_id] ||= {} end |
.reset_id_map ⇒ Object
6 7 8 |
# File 'lib/config_manager/toggle_identity_map.rb', line 6 def reset_id_map @thread_map[Thread.current.object_id] = {} end |
.value(key) ⇒ Object
14 15 16 |
# File 'lib/config_manager/toggle_identity_map.rb', line 14 def value(key) id_map[key] ||= yield end |