1
0
Fork 0
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:
Kyrylo Silin 2012-11-21 15:26:11 +02:00
parent cf786881bb
commit f3c089f681

View file

@ -548,11 +548,7 @@ class Pry
# or nil, if can't find the +key+.
# @note The method never returns `false`.
def [](key)
if command_key = self.get(key)
command_key
else
default.get(key)
end
self.get(key) || default.get(key)
end
# Check for a default options presence.