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-1.3.3 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.2 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.1 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.3.0 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.2.4 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.2.3 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.2.2 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.2.1 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.2.0 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.39 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.38 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.37 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.36 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.35 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.34 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.33 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.32 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.31 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.30 eitil_core/lib/eitil_core/lookups/all_methods.rb
eitil-1.1.29 eitil_core/lib/eitil_core/lookups/all_methods.rb