Module: Help
- Defined in:
- lib/skills/help.rb
Instance Method Summary collapse
-
#explain(skill = nil, task = nil) ⇒ Object
Show all documentation Show the documentation for a skill Show the documentation for a skill and task.
Instance Method Details
#explain(skill = nil, task = nil) ⇒ Object
Show all documentation Show the documentation for a skill Show the documentation for a skill and task
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/skills/help.rb', line 8 def explain(skill = nil, task = nil) skills = skill ? [brain.find_skill(skill)] : brain.skills skills.each do |skill| puts "#"*80 puts "## Skill: #{skill}" puts "##" puts if skill.documentation? puts skill.documentation(task) else puts documentation(skill, task) end end end |