Sha256: 6ce0dbbbda126ba6c34563f5092fa8942e3f2c31e1275d7f8ef78d88c410e59c

Contents?: true

Size: 641 Bytes

Versions: 76

Compression:

Stored size: 641 Bytes

Contents

# require "eitil_core/lookups/all_methods"

require "awesome_print"

class Object

  def all_methods(include_ancestors = true, grep: nil)

    _introspection_methods = %i$
      methods
      singleton_methods
      instance_methods
      private_methods
      public_methods
      protected_methods
      private_instance_methods
      public_instance_methods
      protected_instance_methods
    $

    _introspection_methods.map! do |_m|
      _methods = safe_send _m, include_ancestors
      _methods = grep ? _methods&.grep(grep) : _methods
      { _m => _methods }
    end

    ap _introspection_methods.inject &:merge
    
  end

end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
eitil-2.0.8 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-2.0.7 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-2.0.6 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-2.0.5 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-2.0.4 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-2.0.3 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-2.0.2 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-2.0.1 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-2.0.0 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.4.1 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.4.0 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.12 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.11 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.10 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.9 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.8 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.7 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.6 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.5 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.4 eitil_core/lib/eitil_core/lookups/all_methods.rb