Skip to content

Spelunk unfamiliar Objects and view only its relevant methods

License

Notifications You must be signed in to change notification settings

ryancastro/spelunk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spelunk unfamiliar objects to see what unique methods are in that object, without all the default Ruby garbage you already know! It's like calling .methods on an object, but it returns information you actually care about.

Without Spelunk:

p Spelunk.methods [... :===, :==, :<=>, :<, :<=, :>, :>=, :to_s, :inspect, :included_modules, :include?, :name, :ancestors, :instance_methods, :public_instance_methods, :protected_instance_methods, :private_instance_methods, :constants,...]

With Spelunk

p Spelunk.methods_for Spelunk [:methods_for, :private_methods_for, :public_methods_for]

Installation

gem install spelunk

TODO

  • Write a mechanism for puts with .inspect quickly and easily, since this is how I like to use it the most
  • Find all the funky ways I've under-thought this issue, and fix them one by one.
  • Learn along the way.

About

Spelunk unfamiliar Objects and view only its relevant methods

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages