Module: ExceptionBindingInfos
- Included in:
- Exception
- Defined in:
- lib/enhanced/exception.rb
Instance Method Summary collapse
Instance Method Details
#binding_infos ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/enhanced/exception.rb', line 5 def binding_infos ctx = Enhanced::ExceptionContext.context_for(self) unless ctx ctx = Context.new Enhanced::ExceptionContext.store_context(self, ctx) end ctx.binding_infos end |
#captured_variables ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/enhanced/exception.rb', line 14 def captured_variables if binding_infos.any? bindings_of_interest = select_binding_infos EnhancedErrors.format(bindings_of_interest) else '' end rescue '' end |