Class: Alx::HelpHandler
Instance Attribute Summary
Attributes inherited from Handler
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(configuration, controller) ⇒ HelpHandler
constructor
A new instance of HelpHandler.
Methods inherited from Handler
Constructor Details
#initialize(configuration, controller) ⇒ HelpHandler
Returns a new instance of HelpHandler.
6 7 8 9 10 11 12 13 |
# File 'lib/alx/help_handler.rb', line 6 def initialize( configuration, controller ) super( :configuration => configuration, :command => 'help', :rest_description => 'command', :description => "Gives more information on defined command." ) @controller = controller end |
Instance Method Details
#handle ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/alx/help_handler.rb', line 15 def handle handler = @controller.handlers[ @conf[ :rest ] ] if handler puts handler.help return; end default_help end |