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