hoodwink.d enhanced

Wed Nov 8

Convenient way to inspect methods of an object in irb

module Kernel def m(object) ObjectMethods.new( object.public_methods(false).sort ) end class ObjectMethods < Array def inspect puts self end end end itunes = OSA.app('itunes') m(itunes).size # => 68 m(itunes).grep(/volume/) # => ["sound_volume", "sound_volume="] itunes.sound_volume = 75