mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
rename 'state' local as 'default'.
This commit is contained in:
parent
c0dd290d4f
commit
0f8afdd010
1 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
class Pry::Config::Default < Pry::Config
|
class Pry::Config::Default < Pry::Config
|
||||||
state = {
|
default = {
|
||||||
:input => proc { Readline },
|
:input => proc { Readline },
|
||||||
:output => proc { $stdout },
|
:output => proc { $stdout },
|
||||||
:commands => proc { Pry::Commands },
|
:commands => proc { Pry::Commands },
|
||||||
|
@ -49,12 +49,12 @@ class Pry::Config::Default < Pry::Config
|
||||||
configure_history
|
configure_history
|
||||||
end
|
end
|
||||||
|
|
||||||
state.each do |key, value|
|
default.each do |key, value|
|
||||||
define_method(key) do
|
define_method(key) do
|
||||||
if state[key] == value
|
if default[key] == value
|
||||||
state[key] = value.call
|
default[key] = value.call
|
||||||
end
|
end
|
||||||
state[key]
|
default[key]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue