mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Refactor ClassCommand::Options#[]
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
This commit is contained in:
parent
cf786881bb
commit
f3c089f681
1 changed files with 1 additions and 5 deletions
|
@ -548,11 +548,7 @@ class Pry
|
||||||
# or nil, if can't find the +key+.
|
# or nil, if can't find the +key+.
|
||||||
# @note The method never returns `false`.
|
# @note The method never returns `false`.
|
||||||
def [](key)
|
def [](key)
|
||||||
if command_key = self.get(key)
|
self.get(key) || default.get(key)
|
||||||
command_key
|
|
||||||
else
|
|
||||||
default.get(key)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check for a default options presence.
|
# Check for a default options presence.
|
||||||
|
|
Loading…
Add table
Reference in a new issue