BasicObject
useful when playing with truly enormous objects
Deal with the ^D key being pressed, different behaviour in different cases: 1) In an expression - behave like `!` command (clear input buffer) 2) At top-level session - behave like `exit command (break out of repl loop) 3) In a nested session - behave like `cd ..` (pop a binding)
Will only show the first line of the backtrace
Don't catch these exceptions
The default prompt; includes the target and nesting level
A prompt that includes the full object path as well as input/output (in and out) information. Good for navigation.
may be convenient when working with enormous objects and pretty_print is too slow
A simple prompt - doesn't display target or nesting level
Return a binding object for the receiver.
# File lib/pry/core_extensions.rb, line 24 def __binding__ if is_a?(Module) return class_eval "binding" end unless respond_to? :__binding_impl__ begin instance_eval %{ def __binding_impl__ binding end } rescue TypeError self.class.class_eval %{ def __binding_impl__ binding end } end end __binding_impl__ end
Start a Pry REPL. This method differs from `Pry.start` in that it does not support an options hash. Also, when no parameter is provided, the Pry session will start on the implied receiver rather than on top-level (as in the case of `Pry.start`). It has two forms of invocation. In the first form no parameter should be provided and it will start a pry session on the receiver. In the second form it should be invoked without an explicit receiver and one parameter; this will start a Pry session on the parameter. @param [Object, Binding] target The receiver of the Pry session. @example First form
"dummy".pry
@example Second form
pry "dummy"
@example Start a Pry session on current self (whatever that is)
pry
# File lib/pry/core_extensions.rb, line 19 def pry(target=self) Pry.start(target) end
Generated with the Darkfish Rdoc Generator 2.