1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Fix typo in show_source.rb

1. delete EXPRESSION from usage in BANNER, because user can use EXPRESSION only when -e option is given.

2. add `show-source Pry.foo -e` example to BANNER.

3. rename parameter of options method from `opts` to `opt`, because in other commands `opt` is used.
This commit is contained in:
yui-knk 2014-03-29 22:07:33 +09:00 committed by Ryan Fitzgerald
parent 5da5c22063
commit c42caac680

View file

@ -7,7 +7,7 @@ class Pry
description 'Show the source for a method or class.'
banner <<-'BANNER'
Usage: show-source [OPTIONS] [METH|CLASS|EXPRESSION]
Usage: show-source [OPTIONS] [METH|CLASS]
Aliases: $, show-method
Show the source for a method or class. Tries instance methods first and then
@ -18,14 +18,15 @@ class Pry
show-source Pry#rep # source for Pry#rep method
show-source Pry # for Pry class
show-source Pry -a # for all Pry class definitions (all monkey patches)
show-source Pry.foo -e # for class of Pry.foo
show-source Pry --super # for superclass of Pry (Object class)
https://github.com/pry/pry/wiki/Source-browsing#wiki-Show_method
BANNER
def options(opts)
opts.on :e, :eval, "evaluate the command's input as a ruby expression and lookup the source of its return value"
super(opts)
def options(opt)
opt.on :e, :eval, "evaluate the command's input as a ruby expression and lookup the source of its return value"
super(opt)
end
def process