Class: KairosMcp::SkillsDsl
- Inherits:
-
Object
- Object
- KairosMcp::SkillsDsl
- Defined in:
- lib/kairos_mcp/skills_dsl.rb
Defined Under Namespace
Classes: Skill
Instance Attribute Summary collapse
-
#skills ⇒ Object
readonly
Returns the value of attribute skills.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ SkillsDsl
constructor
A new instance of SkillsDsl.
- #skill(id, &block) ⇒ Object
Constructor Details
#initialize ⇒ SkillsDsl
Returns a new instance of SkillsDsl.
62 63 64 |
# File 'lib/kairos_mcp/skills_dsl.rb', line 62 def initialize @skills = [] end |
Instance Attribute Details
#skills ⇒ Object (readonly)
Returns the value of attribute skills.
66 67 68 |
# File 'lib/kairos_mcp/skills_dsl.rb', line 66 def skills @skills end |
Class Method Details
.load(path) ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/kairos_mcp/skills_dsl.rb', line 54 def self.load(path) dsl = new if File.exist?(path) dsl.instance_eval(File.read(path, encoding: 'UTF-8'), path) end dsl.skills end |
Instance Method Details
#skill(id, &block) ⇒ Object
68 69 70 71 72 |
# File 'lib/kairos_mcp/skills_dsl.rb', line 68 def skill(id, &block) builder = SkillBuilder.new(id) builder.instance_eval(&block) @skills << builder.build end |