Class: TheLocal::Registry
- Inherits:
-
Object
- Object
- TheLocal::Registry
- Defined in:
- lib/the_local/registry.rb
Overview
Accumulates the providers and agents discovered from disk. Installer and TriggerWriter read this to write .claude/agents/ and the delegation trigger.
Instance Attribute Summary collapse
-
#agents ⇒ Object
readonly
Returns the value of attribute agents.
-
#providers ⇒ Object
readonly
Returns the value of attribute providers.
Instance Method Summary collapse
- #add(agent) ⇒ Object
- #add_provider(provider) ⇒ Object
- #clear ⇒ Object
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
Constructor Details
#initialize ⇒ Registry
Returns a new instance of Registry.
11 12 13 14 |
# File 'lib/the_local/registry.rb', line 11 def initialize @agents = [] @providers = [] end |
Instance Attribute Details
#agents ⇒ Object (readonly)
Returns the value of attribute agents.
16 17 18 |
# File 'lib/the_local/registry.rb', line 16 def agents @agents end |
#providers ⇒ Object (readonly)
Returns the value of attribute providers.
16 17 18 |
# File 'lib/the_local/registry.rb', line 16 def providers @providers end |
Instance Method Details
#add(agent) ⇒ Object
18 19 20 |
# File 'lib/the_local/registry.rb', line 18 def add(agent) @agents << agent end |
#add_provider(provider) ⇒ Object
22 23 24 |
# File 'lib/the_local/registry.rb', line 22 def add_provider(provider) @providers << provider end |
#clear ⇒ Object
26 27 28 29 |
# File 'lib/the_local/registry.rb', line 26 def clear @agents.clear @providers.clear end |