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
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# The currently active `Binding`.
|
||||||
|
# @return [Binding] The currently active `Binding` for the session.
|
||||||
|
def current_context
|
||||||
|
binding_stack.last
|
||||||
|
end
|
||||||
|
|
||||||
# The current prompt.
|
# The current prompt.
|
||||||
# This is the prompt at the top of the prompt stack.
|
# This is the prompt at the top of the prompt stack.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue