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