Class: BreakpointContext

Inherits:
Object
  • Object
show all
Defined in:
lib/context_breakpoint.rb

Instance Method Summary collapse

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_breakpointObject



11
12
13
# File 'lib/context_breakpoint.rb', line 11

def contextual_breakpoint
  breakpoint
end