Class: Aid::Scripts::Help
- Inherits:
-
Aid::Script
- Object
- Aid::Script
- Aid::Scripts::Help
- Defined in:
- lib/aid/scripts/help.rb
Constant Summary
Constants included from Colorize
Instance Attribute Summary collapse
-
#script ⇒ Object
readonly
Returns the value of attribute script.
Attributes inherited from Aid::Script
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*argv) ⇒ Help
constructor
A new instance of Help.
- #run ⇒ Object
Methods inherited from Aid::Script
#description, #exit_code, #exit_with_help!, #help, name, run, #step, #system!
Methods included from Inheritable
Methods included from Colorize
Constructor Details
Instance Attribute Details
#script ⇒ Object (readonly)
Returns the value of attribute script.
4 5 6 |
# File 'lib/aid/scripts/help.rb', line 4 def script @script end |
Class Method Details
.description ⇒ Object
13 14 15 |
# File 'lib/aid/scripts/help.rb', line 13 def self.description "Displays help information" end |
.help ⇒ Object
17 18 19 |
# File 'lib/aid/scripts/help.rb', line 17 def self.help "" end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/aid/scripts/help.rb', line 21 def run if script puts "Help for #{colorize(:light_blue, script.name)}:" puts script.help puts else basic_usage end end |