class Object - web-console-2.1.2 Documentation

# class Object

### Public Instance Methods

bindings() click to toggle source

    # File lib/web_console/integration/jruby.rb, line 85
    def bindings
      @bindings || []
    end

callers() click to toggle source

    # File lib/web_console/integration/jruby.rb, line 107
    def callers
      WebConsole::JRuby::FakeJRubyBindingsArray.new
    end

of_caller(*) click to toggle source

    # File lib/web_console/integration/jruby.rb, line 103
    def of_caller(*)
      WebConsole::JRuby::FakeJRubyBinding.new
    end

raise_exception_with_current_bindings(exc) click to toggle source

    # File lib/web_console/integration/rubinius.rb, line 57
    def raise_exception_with_current_bindings(exc)
      if exc.bindings.empty?
        exc.instance_variable_set(:@bindings, WebConsole::Rubinius.current_bindings)
      end

      raise_exception_without_current_bindings(exc)
    end

render_exception_with_web_console(env, exception) click to toggle source

    # File lib/web_console/extensions.rb, line 2
    def render_exception_with_web_console(env, exception)
      render_exception_without_web_console(env, exception).tap do
        error = ActionDispatch::ExceptionWrapper.new(env, exception).exception

        # Get the original exception if ExceptionWrapper decides to follow it.
        env['web_console.exception'] = error

        # ActionView::Template::Error bypass ExceptionWrapper original
        # exception following. The backtrace in the view is generated from
        # reaching out to original_exception in the view.
        if error.is_a?(ActionView::Template::Error)
          env['web_console.exception'] = error.original_exception
        end
      end
    end