class LSL::Shell
Attributes
last_execution[RW]
Public Instance Methods
get_input()
click to toggle source
# File lib/lsl/shell.rb, line 124 def get_input #STDIN.gets.strip require 'readline' Readline.readline("#{Dir.getwd}> ",true).strip end
run(str)
click to toggle source
# File lib/lsl/shell.rb, line 121 def run(str) self.last_execution = LSL::CommandExecution::Compound.new(:command_str => str, :shell => self).tap { |x| x.run! } end
run_loop()
click to toggle source
# File lib/lsl/shell.rb, line 129 def run_loop loop do str = get_input run(str) last_execution.print! end end