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.
evaluates the argument to the pry command as an expression and returns
the source for the return value of the expression. i need to add tests
as well as update changelog.
closes#1184
Wrap command descriptions to 80 characters. Convert some string options
to symbols (where possible). Align options in code. Remove dots in the
end of switch descriptions.
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
John "banister" Mair describes the following key features of commands
as classes:
1. It enables people to extend them by either subclassing or
monkeypatching.
2. It enables them to provide their own API, so that for example, the
Pry::Command::Edit class could have class methods for people to
configure it.
Please, note that I didn't touch easter eggs commands. I also prettified
some strings (your source code reading experience should vastly improve!).
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Pry::CodeObject::Helpers mixin provides the following methods:
command?
module_with_yard_docs?
real_method_object?
c_method?
which are then mixed into the code objects: Pry::Command, Pry::Method, Pry::WrappedModule, Pry::WrappedModule::Candidate
Until we find a better home for it, the code for the complete() method is exactly
the same in each case so we should come up with a way for show-source/show-doc to share it.