Module: Smith::Agent::Registry::Introspection
- Included in:
- Smith::Agent::Registry
- Defined in:
- lib/smith/agent/registry/introspection.rb
Instance Method Summary collapse
Instance Method Details
#binding_for(name) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/smith/agent/registry/introspection.rb', line 7 def binding_for(name) registry_monitor.synchronize do key = normalize_key(name) item = _container[key] item ? Smith::Agent::RegistryBinding.new(key: key, item: item).to_h : nil end end |
#bindings ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/smith/agent/registry/introspection.rb', line 15 def bindings registry_monitor.synchronize do _container.each_with_object({}) do |(key, item), binding_map| binding_map[key] = Smith::Agent::RegistryBinding.new(key: key, item: item).to_h end.freeze end end |