Sha256: 4bf4bd1750dd741e9f9cd403f6540ed78136ad9cdeee9caaa1b37aec41e29892
Contents?: true
Size: 1.16 KB
Versions: 8
Compression:
Stored size: 1.16 KB
Contents
$LOAD_PATH << "lib" require 'curses' X = Curses # shorthand # Colors are 'global' for now Black, Blue, Cyan, Green, Magenta, Red, White, Yellow = :black, :blue, :cyan, :green, :magenta, :red, :white, :yellow require 'version' require 'output' # RubyText, RubyText::Window, Kernel require 'keys' # RubyText::Keys require 'menu' # RubyText require 'window' # RubyText::Window require 'color' # RubyText, RubyText::Window require 'effects' require 'navigation' # RubyText::Window require 'settings' # RubyText require 'widgets' # Skeleton... Can't put classes at top because of #initalize module RubyText module Keys end class Window end end ########## at_exit { RubyText.stop } def import(meth, recv) Kernel.module_eval do define_method(meth) {|*args| recv.send(meth, *args) } end end def make_exception(sym, str) return if Object.constants.include?(sym) Object.const_set(sym, StandardError.dup) define_method(sym) do |*args| msg = str args.each.with_index {|arg, i| msg.sub!("$#{i+1}", arg) } Object.class_eval(sym.to_s).new(msg) end end make_exception(:RTError, "General error: $1 $2 $3")
Version data entries
8 entries across 8 versions & 1 rubygems