Sha256: 1c566e449fc365fb710b56363cf7fc1dcb9442117ca74f6d5192e4d6c5a5dde5

Contents?: true

Size: 840 Bytes

Versions: 2

Compression:

Stored size: 840 Bytes

Contents

#!/usr/bin/ruby -w
#
# This program is an interactive shell for Rumai.
#
# Usage:
#
#   rumai [Options]
#   rumai [Options] -- irb_args
#
#   irb_args:   Command-line options and arguments that should
#               be passed to `irb`, the interactive Ruby shell.
#
# Options:
#

require 'rubygems'
gem 'inochi', '~> 0'
require 'inochi'

Inochi.main :Rumai

require 'irb'
require 'irb/completion'
module IRB
  # Starts an IRB session *inside* the given object.
  #--
  # This code was adapted from a snippet on Massimiliano Mirra's website:
  # http://www.therubymine.com/articles/2007/01/29/programmare-dallinterno
  def self.start_session aContextObj
    setup nil
    session = Irb.new(WorkSpace.new(aContextObj))
    @CONF[:MAIN_CONTEXT] = session.context
    catch(:IRB_EXIT) { session.eval_input }
  end
end

IRB.start_session Rumai

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rumai-2.0.2 bin/rumai
rumai-2.0.1 bin/rumai