module BindingOfCaller::BindingExtensions
Public Instance Methods
callers()
click to toggle source
# File lib/binding_of_caller/jruby_interpreted.rb, line 66 def callers ary = [] n = 2 while binding = of_caller(n) ary << binding n += 1 end ary end
frame_count()
click to toggle source
# File lib/binding_of_caller/jruby_interpreted.rb, line 76 def frame_count callers.count - 1 end
frame_description()
click to toggle source
# File lib/binding_of_caller/jruby_interpreted.rb, line 84 def frame_description nil end
frame_type()
click to toggle source
# File lib/binding_of_caller/jruby_interpreted.rb, line 80 def frame_type nil end
of_caller(index = 1)
click to toggle source
# File lib/binding_of_caller/jruby_interpreted.rb, line 61 def of_caller(index = 1) index += 1 # always omit this frame JRuby.runtime.current_context.binding_of_caller(index) end
Protected Instance Methods
setup_binding_from_location(location)
click to toggle source
# File lib/binding_of_caller/rubinius.rb, line 49 def setup_binding_from_location(location) binding = Binding.setup location.variables, location.variables.method, location.constant_scope, location.variables.self, location binding.instance_variable_set :@frame_description, location.describe.gsub("{ } in", "block in") binding end