Class: Skiptrace::BindingLocations
- Inherits:
- BasicObject
- Defined in:
- lib/skiptrace/binding_locations.rb
Instance Method Summary collapse
-
#initialize(locations, bindings) ⇒ BindingLocations
constructor
A new instance of BindingLocations.
Constructor Details
#initialize(locations, bindings) ⇒ BindingLocations
Returns a new instance of BindingLocations.
3 4 5 6 7 |
# File 'lib/skiptrace/binding_locations.rb', line 3 def initialize(locations, bindings) @locations = locations @bindings = bindings @cached_locations = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (private)
21 22 23 24 25 26 27 28 |
# File 'lib/skiptrace/binding_locations.rb', line 21 def method_missing(name, *args, &block) case maybe_location = @locations.public_send(name, *args, &block) when ::Thread::Backtrace::Location cached_location(maybe_location) else maybe_location end end |