Module: Ripl::ShortErrors
- Defined in:
- lib/ripl/short_errors.rb
Defined Under Namespace
Modules: Commands
Constant Summary collapse
- VERSION =
'0.1.0'
Instance Attribute Summary collapse
-
#last_error ⇒ Object
readonly
Returns the value of attribute last_error.
Instance Method Summary collapse
Instance Attribute Details
#last_error ⇒ Object (readonly)
Returns the value of attribute last_error.
15 16 17 |
# File 'lib/ripl/short_errors.rb', line 15 def last_error @last_error end |
Instance Method Details
#format_error(err) ⇒ Object
17 18 19 20 |
# File 'lib/ripl/short_errors.rb', line 17 def format_error(err) "#{err.class}: #{err.message.chomp}" + ( err.backtrace.first =~ %r|/lib/ripl/shell.rb| ? '' : " [#{err.backtrace.first}]" ) end |
#print_eval_error(err) ⇒ Object
22 23 24 25 |
# File 'lib/ripl/short_errors.rb', line 22 def print_eval_error(err) @last_error = err super end |