@aerenchyma and I are submitting a new pull request in response to pull request #654. This is rebasing with all the latest pry merges.
We are adding the show-source -super option and a few tests. This will also work with multiple super options.
Add super option for show-source command and add three tests
This pull request fails (merged 5bd86d4 into f6ddc1f).
Accidentally deleted process_sourcable_object. Ammended commit. Please reattempt merge.
This pull request passes (merged fd0d786 into f6ddc1f).
why did you get rid of the should here? without it, you're not actually testing anything ;)
You should be lazily initializing @module_object with the result of sup otherwise it'll be recalculated every time someone uses module_object
Also, You should use Module#ancestors rather than Class#superclass to find the relevant superclass, so that included modules are considered too.
Add ancestor module support to show-source -s option
Add test case for ancestor modules and the show-source -s option
This pull request passes (merged 0cc176c into f6ddc1f).
Thanks @banister. I've committed changes that allow using the --super option on Modules, and I've added a test case for it, too. I've also added the should back in (must have accidentally overwritten it), and I've lazily initialized @module_object, so it should only be calculated once.
This is probably a bit too conservative, i think @module_object.ancestors is OK. ;)
Add error raise if module_object method returns nil
This pull request fails (merged b791d23 into f6ddc1f).
Change test to be more specific
Use public method to get wrapped element
Change wrapped method to public
This pull request passes (merged 9b5b26f into f6ddc1f).