Module: EventMachine::Wssh::Help
- Defined in:
- lib/em/wssh/help.rb
Constant Summary collapse
- Title =
'Show this help'
Class Method Summary collapse
Class Method Details
.command(mod) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/em/wssh/help.rb', line 30 def self.command mod if mod.respond_to? :help mod.help else puts mod::Title end end |
.go! ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/em/wssh/help.rb', line 8 def self.go! if mod = Exe.command?(ARGV.shift) command mod else top end end |
.help ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/em/wssh/help.rb', line 38 def self.help puts "Shows help for WSSH suite or individual commands\n\n\#{Exe.usage} [command]\n EOT\nend\n" |
.top ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/em/wssh/help.rb', line 16 def self.top require_relative 'all' puts "WSSH suite v\#{VERSION}\n\nUsage: wssh command [parameters...]\n\nAvailable commands:\n\n EOT\n Exe.commands.each{|cmd, mod| puts \" wssh \#{cmd}\\t\#{mod::Title}\"}\nend\n" |