mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
return an instance of Pry::Config from Pry.current.
This commit is contained in:
parent
4d39a53e61
commit
fe54ff7ca0
1 changed files with 5 additions and 2 deletions
|
@ -34,9 +34,12 @@ class Pry
|
|||
@main ||= TOPLEVEL_BINDING.eval "self"
|
||||
end
|
||||
|
||||
# @return [Hash] Pry's `Thread.current` hash
|
||||
#
|
||||
# @return [Pry::Config]
|
||||
# Returns a value store for an instance of Pry running on the current thread.
|
||||
#
|
||||
def self.current
|
||||
Thread.current[:__pry__] ||= {}
|
||||
Thread.current[:__pry__] ||= Pry::Config.from_hash({}, nil)
|
||||
end
|
||||
|
||||
# Load the given file in the context of `Pry.toplevel_binding`
|
||||
|
|
Loading…
Reference in a new issue