Class: ShellBackend

Inherits:
Object
  • Object
show all
Defined in:
lib/rhcp_shell/shell_backend.rb

Overview

responsible for what should happen when the user interacts with the shell provides tab completion options and processes the user’s input

Direct Known Subclasses

RHCPShellBackend

Instance Method Summary collapse

Instance Method Details

#complete(word) ⇒ Object

is called whenever the user requests tab completion should return an array of completion proposals



12
13
14
# File 'lib/rhcp_shell/shell_backend.rb', line 12

def complete(word)
  raise "not implemented in ShellBackend!"
end

#process_ctrl_cObject



21
22
23
# File 'lib/rhcp_shell/shell_backend.rb', line 21

def process_ctrl_c
  
end

#process_input(command_line) ⇒ Object

is called whenever the user submits a command (hitting enter)



6
7
8
# File 'lib/rhcp_shell/shell_backend.rb', line 6

def process_input(command_line)
  raise "not implemented in ShellBackend!"
end

#promptObject

is called by the shell to get the prompt that should be displayed



17
18
19
# File 'lib/rhcp_shell/shell_backend.rb', line 17

def prompt
  ">"    
end

#show_bannerObject



25
26
27
# File 'lib/rhcp_shell/shell_backend.rb', line 25

def show_banner
  
end