class Readline_Input

Public Instance Methods

get_line() click to toggle source
# File libs/input.rb, line 40
def get_line
  line = Readline.readline(@promptfunc.call, true)
  return nil if line.nil?
  if line =~ /^\s*$/ or Readline::HISTORY.to_a[-2] == line
    Readline::HISTORY.pop
  end
  return line
end
set_prompt_func(prompt_func) click to toggle source
# File libs/input.rb, line 36
def set_prompt_func(prompt_func)
  @promptfunc=prompt_func
end