Class: XHelpCommand
- Inherits:
-
Object
- Object
- XHelpCommand
- Defined in:
- lib/commands/xhelp_command.rb
Instance Method Summary collapse
- #accepts_shell_command?(command) ⇒ Boolean
- #execute_from_shell(params) ⇒ Object
- #help(command = nil) ⇒ Object
-
#initialize(view) ⇒ XHelpCommand
constructor
A new instance of XHelpCommand.
Constructor Details
#initialize(view) ⇒ XHelpCommand
Returns a new instance of XHelpCommand.
3 4 5 |
# File 'lib/commands/xhelp_command.rb', line 3 def initialize view @view = view end |
Instance Method Details
#accepts_shell_command?(command) ⇒ Boolean
19 20 21 |
# File 'lib/commands/xhelp_command.rb', line 19 def accepts_shell_command? command command == 'xhelp' end |
#execute_from_shell(params) ⇒ Object
7 8 9 |
# File 'lib/commands/xhelp_command.rb', line 7 def execute_from_shell params help params[1] end |
#help(command = nil) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/commands/xhelp_command.rb', line 11 def help command=nil if command then @view.show_detailed_help command.downcase else @view.show_extended_help end end |