Module: WebConsole
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/web_console.rb,
lib/web_console/view.rb,
lib/web_console/errors.rb,
lib/web_console/railtie.rb,
lib/web_console/request.rb,
lib/web_console/session.rb,
lib/web_console/version.rb,
lib/web_console/response.rb,
lib/web_console/template.rb,
lib/web_console/evaluator.rb,
lib/web_console/whitelist.rb,
lib/web_console/middleware.rb,
lib/web_console/whiny_request.rb,
lib/web_console/testing/helper.rb,
lib/web_console/exception_mapper.rb,
lib/web_console/testing/erb_precompiler.rb,
lib/web_console/testing/fake_middleware.rb
Defined Under Namespace
Modules: Testing Classes: Evaluator, ExceptionMapper, Middleware, Railtie, Request, Response, Session, Template, View, WhinyRequest, Whitelist
Constant Summary collapse
- Error =
The base class for every Web Console related error.
Class.new(StandardError)
- DoubleRenderError =
Raised when there is an attempt to render a console more than once.
Class.new(Error)
- VERSION =
'3.3.1'
- @@logger =
ActiveSupport::Logger.new($stderr)
Class Method Summary collapse
Class Method Details
.caller_bindings ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/web_console/integration/cruby.rb', line 3 def WebConsole.caller_bindings bindings = RubyVM::DebugInspector.open do |context| context.backtrace_locations.each_index.map { |i| context.frame_binding(i) } end # For C functions, we can't extract a binding. In this case, # DebugInspector#frame_binding would have returned us nil. That's why we need # to compact the bindings. # # Dropping two bindings, removes the current Ruby one in this exact method, # and the one in the caller method. The caller method binding can be obtained # by Kernel#binding, if needed. bindings.compact.drop(2) end |