Sha256: d985a197ee266248024b4e9620ade0a0da29bb1fd74c6284d7882b382175231a
Contents?: true
Size: 657 Bytes
Versions: 4
Compression:
Stored size: 657 Bytes
Contents
=begin rdoc add method methods2 so that it returns lists that are split into two kind of [adds a marker where the inherited methods begin]. =end module Kernel alias :methods_old :methods def methods2 all = true if all # give some marker designating when the inherited methods start (public_methods(false) << :"inherited methods after this point >>") + (public_methods(true) - public_methods(false)) else public_methods(false) end end end class Object def my_methods(_super=false) _methods = (_super) ? self.class.superclass.new.methods : Object.methods (self.methods - _methods).sort end end
Version data entries
4 entries across 4 versions & 1 rubygems