mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
added Pry#current_context
shorthand for _pry_.binding_stack.last, the currently active binding
This commit is contained in:
parent
ac0100fea5
commit
ad4fe02e6c
1 changed files with 6 additions and 0 deletions
|
@ -79,6 +79,12 @@ class Pry
|
|||
true
|
||||
end
|
||||
|
||||
# The currently active `Binding`.
|
||||
# @return [Binding] The currently active `Binding` for the session.
|
||||
def current_context
|
||||
binding_stack.last
|
||||
end
|
||||
|
||||
# The current prompt.
|
||||
# This is the prompt at the top of the prompt stack.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue