Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 633 Bytes

show-public-methods-with-pry.md

File metadata and controls

17 lines (14 loc) · 633 Bytes

Show Public Methods With Pry

Open up a pry session and use the -m flag with the ls command to show just the public methods for an object.

> ls -m :hello
Comparable#methods: <  <=  >  >=  between?
Symbol#methods:
  <=>  as_json      empty?    length              slice     to_sym
  ==   capitalize   encoding  match               succ      upcase
  ===  casecmp      id2name   next                swapcase
  =~   downcase     inspect   pretty_print_cycle  to_proc
  []   duplicable?  intern    size                to_s

source