Class: Ripl::Shell
Defined Under Namespace
Modules: API
Constant Summary collapse
- OPTIONS =
{:name=>'ripl', :result_prompt=>'=> ', :prompt=>'>> ', :binding=>TOPLEVEL_BINDING, :irbrc=>'~/.irbrc'}
- EXIT_WORDS =
[nil, 'exit', 'quit']
Instance Attribute Summary collapse
-
#binding ⇒ Object
Returns the value of attribute binding.
-
#line ⇒ Object
Returns the value of attribute line.
-
#name ⇒ Object
Returns the value of attribute name.
-
#result ⇒ Object
Returns the value of attribute result.
Attributes included from API
Class Method Summary collapse
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(options = {}) ⇒ Shell
constructor
A new instance of Shell.
-
#loop ⇒ Object
Loops shell until user exits.
Methods included from API
#add_commands, #after_loop, #before_loop, #eval_input, #format_error, #format_result, #get_input, #handle_interrupt, #loop_eval, #loop_once, #print_eval_error, #print_result
Constructor Details
Instance Attribute Details
#binding ⇒ Object
Returns the value of attribute binding.
14 15 16 |
# File 'lib/ripl/shell.rb', line 14 def binding @binding end |
#line ⇒ Object
Returns the value of attribute line.
14 15 16 |
# File 'lib/ripl/shell.rb', line 14 def line @line end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/ripl/shell.rb', line 14 def name @name end |
#result ⇒ Object
Returns the value of attribute result.
14 15 16 |
# File 'lib/ripl/shell.rb', line 14 def result @result end |
Class Method Details
.create(options = {}) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/ripl/shell.rb', line 6 def self.create(={}) require 'ripl/readline' if [:readline] require 'ripl/completion' new() rescue LoadError new() end |