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:
parent
5da5c22063
commit
c42caac680
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue