Class: Anthemic::Tools::Base
- Inherits:
-
Object
- Object
- Anthemic::Tools::Base
- Defined in:
- lib/anthemic/tools/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, description:) ⇒ Base
constructor
Initialize a new tool.
-
#run(args = {}) ⇒ Object
Run the tool with provided arguments.
Constructor Details
#initialize(name:, description:) ⇒ Base
Initialize a new tool
12 13 14 15 |
# File 'lib/anthemic/tools/base.rb', line 12 def initialize(name:, description:) @name = name @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/anthemic/tools/base.rb', line 6 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/anthemic/tools/base.rb', line 6 def name @name end |
Instance Method Details
#run(args = {}) ⇒ Object
Run the tool with provided arguments
21 22 23 |
# File 'lib/anthemic/tools/base.rb', line 21 def run(args = {}) raise NotImplementedError, "Subclasses must implement #run" end |