Commit Graph

6 Commits

Author SHA1 Message Date
John Mair c1ae63446f define .source, .doc, etc on Pry::ClassCommand
This is so that Pry::CodeObject can return Pry::ClassCommand objects directly, this is impt
as we want slightly different behaviour than just Pry::WrappedModule(command_class), notably .doc should return
command help rather than comments above the command's class definition.
2012-12-27 23:02:52 +01:00
John Mair 407b20470a improve show-source/show-doc via Pry::CodeObject::Helpers mixin
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
2012-12-25 13:50:42 +01:00
John Mair 2f0c4c28a6 Pry::CodeObject, allow lookups for methods of the form: local#method
the '#' used to be interpreted as a comment and so only 'local' and not the associated method was looked up.
Fixed this by letting strings of the form /\S#\S/ pass through to Pry::Method lookup
2012-12-22 22:59:03 +01:00
John Mair e23ec5ed33 fixed up code_object.rb to retrieve commands by listing name 2012-12-20 18:05:42 +01:00
John Mair 405aacf76d added ability to extract an implicit object from binding when no string is given 2012-12-20 18:05:42 +01:00
John Mair bbd4df87d4 started code_object stuff 2012-12-20 18:05:42 +01:00