module Ripl::Ripper

Constants

VERSION

Public Instance Methods

before_loop() click to toggle source
Calls superclass method
# File lib/ripl/ripper.rb, line 8
def before_loop
  super
  @buffer = []
end
eval_input(input) click to toggle source
Calls superclass method
# File lib/ripl/ripper.rb, line 28
def eval_input(input)
  @buffer << input
  @input = @buffer.join("\n")
  ripper_valid?(@input) ? super(@input) : throw(:multiline)
end
loop_once() click to toggle source
Calls superclass method
# File lib/ripl/ripper.rb, line 17
def loop_once
  catch(:multiline) do
    super
    @buffer = []
  end
end
prompt() click to toggle source
Calls superclass method
# File lib/ripl/ripper.rb, line 13
def prompt
  @buffer.empty? ? super : config[:ripper_prompt]
end
ripper_valid?(str) click to toggle source
# File lib/ripl/ripper.rb, line 24
def ripper_valid?(str)
  !!Ripper::SexpBuilder.new(str).parse
end