Class: Backend

Inherits:
Object
  • Object
show all
Defined in:
lib/vop/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

VopShellBackend

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/vop/shell/backend.rb', line 12

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

#process_ctrl_cObject



20
21
22
# File 'lib/vop/shell/backend.rb', line 20

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/vop/shell/backend.rb', line 6

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

#promptObject



16
17
18
# File 'lib/vop/shell/backend.rb', line 16

def prompt
  ">"
end

#show_bannerObject



24
25
26
# File 'lib/vop/shell/backend.rb', line 24

def show_banner

end