Class: Eggsh::Runner

Inherits:
Object show all
Defined in:
lib/runner.rb

Instance Method Summary collapse

Constructor Details

#initializeRunner

Returns a new instance of Runner.



10
11
12
13
# File 'lib/runner.rb', line 10

def initialize
  @shell = Eggsh::Shell.new
  load_rc
end

Instance Method Details

#run!Object



15
16
17
18
19
20
21
22
23
# File 'lib/runner.rb', line 15

def run!
  Readline.completion_append_character = " "
  Readline.completion_proc = Readline::FILENAME_COMPLETION_PROC
  Readline.basic_word_break_characters = ''

  while line = read
    @shell.exec line
  end
end