{"id":15512137,"url":"https://github.com/seanlerner/interesting_methods","last_synced_at":"2025-10-12T09:30:30.562Z","repository":{"id":56877822,"uuid":"126538134","full_name":"seanlerner/interesting_methods","owner":"seanlerner","description":"See relevant methods in your repl by adding .im to any object in ruby","archived":false,"fork":false,"pushed_at":"2018-03-24T19:48:56.000Z","size":45,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-07T21:32:48.189Z","etag":null,"topics":["debugging","irb","pry","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seanlerner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-23T20:57:18.000Z","updated_at":"2023-10-19T18:40:37.000Z","dependencies_parsed_at":"2022-08-20T23:10:31.299Z","dependency_job_id":null,"html_url":"https://github.com/seanlerner/interesting_methods","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/seanlerner/interesting_methods","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanlerner%2Finteresting_methods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanlerner%2Finteresting_methods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanlerner%2Finteresting_methods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanlerner%2Finteresting_methods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanlerner","download_url":"https://codeload.github.com/seanlerner/interesting_methods/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanlerner%2Finteresting_methods/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007449,"owners_count":26084313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugging","irb","pry","ruby"],"created_at":"2024-10-02T09:53:28.421Z","updated_at":"2025-10-12T09:30:30.305Z","avatar_url":"https://github.com/seanlerner.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Interesting Methods\n\nThis gem lets you add `.im` to any object in Ruby to see the interesting methods.\n\n`.im` stands for 'Interesting Methods'.\n\nWithout this gem, to find out an object's methods, you might try this:\n\n```ruby\nMyClass.methods\nmy_instance.methods\n```\n\nThe problem? Because each of these statements show you all of the object's methods, including the inherited methods, it can be hard to find what you're after. \n\n---\n\nTo see only the interesting methods on an object, try one of these statements instead:\n\n```ruby\nMyClass.methods - Object.methods\nmy_instance.methods - Object.methods\nMyClass.singleton_methods(false)\nmy_instance.instance_methods(false)\nMyModule.singleton_methods\nMyModule.instance_methods\n```\n\n---\n\nThe `interesting_methods` gem wraps the above techniques into a simple `.im` method that you can call on any object (class, instance, module) and display the methods you want:\n\n```\nMyClass.im       # [:my_class_method_a, :my_class_method_b]\nmy_instance.im   # [:my_instance_method_a, :my_instance_method_b]\nMyModule.im      # [:my_module_method_a, :my_module_method_b]\n```\n\n## Installation\n\nFirst install the gem:\n\n```shell\ngem install interesting_methods\n```\n\nThen create `irb` and `pry` *rc* files if they don't already exist:\n\n```shell\ntouch ~/.irbrc\ntouch ~/.pryrc\n```\n\nEdit each of those `rc` files and add the following code:\n\n```ruby\nif Gem::Specification.find_all_by_name('interesting_methods').any?\n  require 'interesting_methods'\nend\n```\n\nYou're all set up now!\n\n## Usage\n\nLoad up either `irb` or `pry` from your command line.\nAdd `.im` to any object to see its interesting methods.\n\n### Examples\n\n- \u003chttp://smallcity.ca/2018/03/23/interesting-methods-gem\u003e (blog post with examples)\n- \u003chttp://smallcity.ca/2018/03/23/method-driven-development\u003e ('Method Driven Development' screencast using gem)\n\n## Caveat\n\nThis gem is not meant to be used in production as it monkey patches Ruby's core `Object` class.\n\n## Development\n\nAfter checking out this repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests.\n\nYou can run `guard` for a continuous test runner.\n\nYou can run `bin/console` for an interactive prompt that will allow you to experiment.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/seanlerner/interesting_methods.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Credit\n\nHaving `interesting_methods` available in your repl is something Ruby programmers have been doing for a while. I think I first came across it years ago in a stackoverflow post. Google `interesting_methods`and you'll find blog posts and dotfiles with similar functionality already implemented. AFAIK this is the first time its been packaged up in a gem.\n\nSean Lerner\u003cbr\u003e\nhttp://smallcity.ca\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanlerner%2Finteresting_methods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanlerner%2Finteresting_methods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanlerner%2Finteresting_methods/lists"}