File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ _310 TILs and counting..._
238238- [ Returning With Sequel] ( ruby/returning-with-sequel.md )
239239- [ Safe Navigation Operator] ( ruby/safe-navigation-operator.md )
240240- [ Set RVM Default Ruby] ( ruby/set-rvm-default-ruby.md )
241+ - [ Show Public Methods With Pry] ( ruby/show-public-methods-with-pry.md )
241242- [ Squeeze Out The Extra Space] ( ruby/squeeze-out-the-extra-space.md )
242243- [ Summing Collections] ( ruby/summing-collections.md )
243244- [ Uncaught Exceptions In Pry] ( ruby/uncaught-exceptions-in-pry.md )
Original file line number Diff line number Diff line change 1+ # Show Public Methods With Pry
2+
3+ Open up a [ ` pry ` ] ( https://github.com/pry/pry ) session and use the ` -m ` flag
4+ with the ` ls ` command to show just the public methods for an object.
5+
6+ ``` ruby
7+ > ls - m :hello
8+ Comparable # methods: < <= > >= between?
9+ Symbol # methods:
10+ <=> as_json empty? length slice to_sym
11+ == capitalize encoding match succ upcase
12+ === casecmp id2name next swapcase
13+ =~ downcase inspect pretty_print_cycle to_proc
14+ [] duplicable? intern size to_s
15+ ```
16+
17+ [ source] ( https://github.com/pry/pry/wiki/State-navigation#Ls )
You can’t perform that action at this time.
0 commit comments