Class: RailsAgents::Skill
- Inherits:
-
Object
- Object
- RailsAgents::Skill
- Defined in:
- lib/rails_agents/skill.rb
Constant Summary collapse
- SERVER =
:server- PORTABLE =
:portable- ANTHROPIC_DOCUMENT =
:anthropic_document
Instance Attribute Summary collapse
-
#anthropic_skill ⇒ Object
readonly
Returns the value of attribute anthropic_skill.
-
#anthropic_tool ⇒ Object
readonly
Returns the value of attribute anthropic_tool.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#portable_tool ⇒ Object
readonly
Returns the value of attribute portable_tool.
-
#requires ⇒ Object
readonly
Returns the value of attribute requires.
Instance Method Summary collapse
- #anthropic_document? ⇒ Boolean
-
#initialize(name:, kind:, anthropic_tool: nil, anthropic_skill: nil, requires: [], portable_tool: nil) ⇒ Skill
constructor
A new instance of Skill.
- #portable? ⇒ Boolean
- #server? ⇒ Boolean
Constructor Details
#initialize(name:, kind:, anthropic_tool: nil, anthropic_skill: nil, requires: [], portable_tool: nil) ⇒ Skill
Returns a new instance of Skill.
11 12 13 14 15 16 17 18 |
# File 'lib/rails_agents/skill.rb', line 11 def initialize(name:, kind:, anthropic_tool: nil, anthropic_skill: nil, requires: [], portable_tool: nil) @name = name.to_sym @kind = kind @anthropic_tool = anthropic_tool @anthropic_skill = anthropic_skill @requires = requires.map(&:to_sym) @portable_tool = portable_tool end |
Instance Attribute Details
#anthropic_skill ⇒ Object (readonly)
Returns the value of attribute anthropic_skill.
9 10 11 |
# File 'lib/rails_agents/skill.rb', line 9 def anthropic_skill @anthropic_skill end |
#anthropic_tool ⇒ Object (readonly)
Returns the value of attribute anthropic_tool.
9 10 11 |
# File 'lib/rails_agents/skill.rb', line 9 def anthropic_tool @anthropic_tool end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
9 10 11 |
# File 'lib/rails_agents/skill.rb', line 9 def kind @kind end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/rails_agents/skill.rb', line 9 def name @name end |
#portable_tool ⇒ Object (readonly)
Returns the value of attribute portable_tool.
9 10 11 |
# File 'lib/rails_agents/skill.rb', line 9 def portable_tool @portable_tool end |
#requires ⇒ Object (readonly)
Returns the value of attribute requires.
9 10 11 |
# File 'lib/rails_agents/skill.rb', line 9 def requires @requires end |
Instance Method Details
#anthropic_document? ⇒ Boolean
22 |
# File 'lib/rails_agents/skill.rb', line 22 def anthropic_document? = kind == ANTHROPIC_DOCUMENT |
#portable? ⇒ Boolean
21 |
# File 'lib/rails_agents/skill.rb', line 21 def portable? = kind == PORTABLE |