Class: Rubydex::CLI::Command::Skill
- Inherits:
-
Command
- Object
- Command
- Rubydex::CLI::Command::Skill
- Defined in:
- lib/rubydex/cli/command/skill.rb
Overview
rdx skill [ID] — lists available skill ids, or loads and prints a skill's body by id.
Instance Method Summary collapse
-
#run ⇒ Object
: -> void.
Instance Method Details
#run ⇒ Object
: -> void
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rubydex/cli/command/skill.rb', line 17 def run id = argv.shift abort_with_usage("unexpected argument: #{argv.first}") unless argv.empty? id ? print_skill(id) : list_skills rescue Rubydex::SkillError => e abort(e.) end |