Class: TheLocal::Registry
- Inherits:
-
Object
- Object
- TheLocal::Registry
- Defined in:
- lib/the_local/registry.rb
Overview
Accumulates the providers and agents contributed by everything that calls TheLocal.register. The install generator reads 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.
12 13 14 15 |
# File 'lib/the_local/registry.rb', line 12 def initialize @agents = [] @providers = [] end |
Instance Attribute Details
#agents ⇒ Object (readonly)
Returns the value of attribute agents.
17 18 19 |
# File 'lib/the_local/registry.rb', line 17 def agents @agents end |
#providers ⇒ Object (readonly)
Returns the value of attribute providers.
17 18 19 |
# File 'lib/the_local/registry.rb', line 17 def providers @providers end |
Instance Method Details
#add(agent) ⇒ Object
19 20 21 |
# File 'lib/the_local/registry.rb', line 19 def add(agent) @agents << agent end |
#add_provider(provider) ⇒ Object
23 24 25 |
# File 'lib/the_local/registry.rb', line 23 def add_provider(provider) @providers << provider end |
#clear ⇒ Object
27 28 29 30 |
# File 'lib/the_local/registry.rb', line 27 def clear @agents.clear @providers.clear end |