Class: WebConsole::JRuby::FakeJRubyBindingsArray

Inherits:
Array
  • Object
show all
Defined in:
lib/web_console/integration/jruby.rb

Overview

A fake array of FakeJRubyBinding objects.

It is used in Exception#bindings to make sure that when users switch bindings on the UI, they get a FakeJRubyBinding notifying them what to do if they want introspection.

Instance Method Summary collapse

Instance Method Details

#[]Object



69
70
71
# File 'lib/web_console/integration/jruby.rb', line 69

def [](*)
  FakeJRubyBinding.new
end

#to_aryObject

For Kernel#Array and other implicit conversion API. JRuby expects it to return an object that is_a? an Array. This is the reasoning of FakeJRubyBindingsArray being a subclass of Array.



76
77
78
# File 'lib/web_console/integration/jruby.rb', line 76

def to_ary
  self
end