mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
look for a setter before anything else in Pry::Config#method_missing().
This commit is contained in:
parent
358395435b
commit
f4462a48cc
1 changed files with 4 additions and 4 deletions
|
@ -25,13 +25,13 @@ class Pry::Config
|
|||
|
||||
def method_missing(name, *args, &block)
|
||||
key = name.to_s
|
||||
if @lookup.has_key?(key)
|
||||
if key[-1] == "="
|
||||
short_key = key.to_s[0..-2]
|
||||
@lookup[short_key] = args[0]
|
||||
elsif @lookup.has_key?(key)
|
||||
@lookup[key]
|
||||
elsif @default.respond_to?(name)
|
||||
@default.public_send(name, *args, &block)
|
||||
elsif key[-1] == "="
|
||||
short_key = key.to_s[0..-2]
|
||||
@lookup[short_key] = args[0]
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue