Module: Bulldogger::Skill
- Defined in:
- lib/bulldogger/skill.rb
Overview
Resolves the skill for all evidence writers and the CLI. It does not install the skill or decide how a caller presents the resolved path. One resolver keeps every evidence format and the CLI in agreement.
Constant Summary collapse
- ROOT =
File.("../..", __dir__).freeze
Class Method Summary collapse
Class Method Details
.file(root = ROOT) ⇒ Object
17 18 19 20 |
# File 'lib/bulldogger/skill.rb', line 17 def self.file(root = ROOT) skill_path = path(root) File.join(skill_path, "SKILL.md") if skill_path end |
.path(root = ROOT) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/bulldogger/skill.rb', line 10 def self.path(root = ROOT) path = File.("skills/bulldogger", root) # A vendored lib/ tree can omit the skill. A missing path costs the # reader less than a path that points to a file that does not exist. File.file?(File.join(path, "SKILL.md")) ? path : nil end |