Class: BreakpointContext
- Inherits:
-
Object
- Object
- BreakpointContext
- Defined in:
- lib/context_breakpoint.rb
Instance Method Summary collapse
- #contextual_breakpoint ⇒ Object
-
#initialize(bind) ⇒ BreakpointContext
constructor
A new instance of BreakpointContext.
- #method_missing(symbol, *args) ⇒ Object
Constructor Details
#initialize(bind) ⇒ BreakpointContext
Returns a new instance of BreakpointContext.
2 3 4 5 |
# File 'lib/context_breakpoint.rb', line 2 def initialize(bind) @local_vars = bind.local_variable_get(:local_vars) @bind = bind end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object
6 7 8 9 10 |
# File 'lib/context_breakpoint.rb', line 6 def method_missing(symbol, *args) if @local_vars.include? symbol.to_s @local_vars[symbol.to_s] end end |
Instance Method Details
#contextual_breakpoint ⇒ Object
11 12 13 |
# File 'lib/context_breakpoint.rb', line 11 def contextual_breakpoint breakpoint end |