class Ripl::Shell
Constants
- EXIT_WORDS
- OPTIONS
Attributes
binding[RW]
input[RW]
line[RW]
name[RW]
result[RW]
Public Class Methods
create(options={})
click to toggle source
# File lib/ripl/shell.rb, line 2 def self.create(options={}) if options[:readline] require options[:readline] == true ? 'readline' : options[:readline] require 'ripl/readline' end require 'ripl/completion' if options[:completion] new(options) rescue LoadError new(options) end
new(options={})
click to toggle source
# File lib/ripl/shell.rb, line 25 def initialize(options={}) options = OPTIONS.merge options @name, @binding = options.values_at(:name, :binding) @prompt, @result_prompt = options.values_at(:prompt, :result_prompt) @irbrc, @line = options[:irbrc], 1 end
Public Instance Methods
config()
click to toggle source
# File lib/ripl/shell.rb, line 39 def config() Ripl.config end
loop()
click to toggle source
Loops shell until user exits
# File lib/ripl/shell.rb, line 33 def loop before_loop in_loop after_loop end