module Ripl::MultiLine::LiveError

Constants

ERROR_MESSAGES
VERSION

Public Class Methods

ruby_engine() click to toggle source
# File lib/ripl/multi_line/live_error.rb, line 20
def self.ruby_engine
  return @ruby_engine if defined? @ruby_engine
  @ruby_engine = defined?(RUBY_ENGINE) && RUBY_ENGINE.downcase.to_sym
  @ruby_engine = :ruby   if !ERROR_MESSAGES.keys.include?(ruby_engine) # 1.8 is same as 1.9
  @ruby_engine = :ruby19 if ruby_engine == :ruby && RUBY_VERSION <= "2.0"
  @ruby_engine
end

Public Instance Methods

eval_input(input) click to toggle source
Calls superclass method
# File lib/ripl/multi_line/live_error.rb, line 68
def eval_input(input)
  if input =~ /;\s*\Z/ # force multi line with ;
    handle_multiline(:forced)
  elsif input =~ /^=begin(\s.*)?$/ && !@buffer
    @ignore_mode = true # MAYBE: change prompt
  elsif !@ignore_mode
    super
  end
end
print_result(result) click to toggle source
Calls superclass method