Class: ShellCommandHandler

Inherits:
Object
  • Object
show all
Includes:
CommandHandler
Defined in:
lib/command_handlers/shell_command_handler.rb

Instance Method Summary collapse

Instance Method Details

#can_handle?(parent, command_symbol, *args, &block) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/command_handlers/shell_command_handler.rb', line 7

def can_handle?(parent, command_symbol, *args, &block)
  command_symbol.to_s == "shell"
end

#do_handle(parent, command_symbol, *args, &block) ⇒ Object



11
12
13
# File 'lib/command_handlers/shell_command_handler.rb', line 11

def do_handle(parent, command_symbol, *args, &block)
  RShell.send(:new, *args)
end