{"id":13484204,"url":"https://github.com/oggy/looksee","last_synced_at":"2025-03-27T16:30:32.750Z","repository":{"id":527601,"uuid":"156346","full_name":"oggy/looksee","owner":"oggy","description":"Supercharged method introspection in IRB","archived":false,"fork":false,"pushed_at":"2022-11-08T05:16:12.000Z","size":390,"stargazers_count":364,"open_issues_count":0,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-19T15:41:50.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/oggy.png","metadata":{"files":{"readme":"README.markdown","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-03-22T13:25:14.000Z","updated_at":"2025-02-18T16:23:35.000Z","dependencies_parsed_at":"2023-01-13T10:26:05.680Z","dependency_job_id":null,"html_url":"https://github.com/oggy/looksee","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oggy%2Flooksee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oggy%2Flooksee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oggy%2Flooksee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oggy%2Flooksee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oggy","download_url":"https://codeload.github.com/oggy/looksee/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245882179,"owners_count":20687841,"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","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":[],"created_at":"2024-07-31T17:01:20.577Z","updated_at":"2025-03-27T16:30:32.297Z","avatar_url":"https://github.com/oggy.png","language":"C","funding_links":[],"categories":["C","IRB"],"sub_categories":[],"readme":"# Looksee [![Build Status](https://travis-ci.org/oggy/looksee.png)](https://travis-ci.org/oggy/looksee) [![Gem Version](https://badge.fury.io/rb/looksee.svg)](http://badge.fury.io/rb/looksee)\n\nA tool for illustrating the ancestry and method lookup path of\nobjects. Handy for exploring unfamiliar codebases.\n\n## How\n\nInstall me:\n\n    gem install looksee\n\nPop this in your `.irbrc`:\n\n    require 'looksee'\n\nNow each object has a method `ls`, which shows you all its methods.\n\n    irb\u003e [].ls\n    =\u003e BasicObject\n      !   __id__    initialize     method_missing            singleton_method_undefined\n      !=  __send__  instance_eval  singleton_method_added\n      ==  equal?    instance_exec  singleton_method_removed\n    Kernel\n      !~                       enum_for                    kind_of?                  respond_to_missing?\n      \u003c=\u003e                      eql?                        lambda                    select\n      ===                      eval                        load                      send\n      =~                       exec                        local_variables           set_trace_func\n      Array                    exit                        loop                      singleton_class\n      Complex                  exit!                       method                    singleton_method\n      Float                    extend                      methods                   singleton_methods\n      Hash                     fail                        nil?                      sleep\n      Integer                  fork                        object_id                 spawn\n      Rational                 format                      open                      sprintf\n      String                   freeze                      p                         srand\n      __callee__               frozen?                     print                     syscall\n      __dir__                  gem                         printf                    system\n      __method__               gem_original_require        private_methods           taint\n      `                        gets                        proc                      tainted?\n      abort                    global_variables            protected_methods         tap\n      at_exit                  hash                        public_method             test\n      autoload                 initialize_clone            public_methods            throw\n      autoload?                initialize_copy             public_send               to_enum\n      binding                  initialize_dup              putc                      to_s\n      block_given?             inspect                     puts                      trace_var\n      caller                   instance_of?                raise                     trap\n      caller_locations         instance_variable_defined?  rand                      trust\n      catch                    instance_variable_get       readline                  untaint\n      class                    instance_variable_set       readlines                 untrace_var\n      clone                    instance_variables          remove_instance_variable  untrust\n      define_singleton_method  is_a?                       require                   untrusted?\n      display                  iterator?                   require_relative          warn\n      dup                      itself                      respond_to?\n    Looksee::ObjectMixin\n      ls\n    Object\n      DelegateClass  default_src_encoding  irb_binding\n    Enumerable\n      all?            detect            entries     group_by  min        reject        take\n      any?            drop              find        include?  min_by     reverse_each  take_while\n      chunk           drop_while        find_all    inject    minmax     select        to_a\n      chunk_while     each_cons         find_index  lazy      minmax_by  slice_after   to_h\n      collect         each_entry        first       map       none?      slice_before  to_set\n      collect_concat  each_slice        flat_map    max       one?       slice_when    zip\n      count           each_with_index   grep        max_by    partition  sort\n      cycle           each_with_object  grep_v      member?   reduce     sort_by\n    Array\n      \u0026              collect!     eql?             keep_if               reverse       sort!\n      *              combination  fetch            last                  reverse!      sort_by!\n      +              compact      fill             length                reverse_each  take\n      -              compact!     find_index       map                   rindex        take_while\n      \u003c\u003c             concat       first            map!                  rotate        to_a\n      \u003c=\u003e            count        flatten          pack                  rotate!       to_ary\n      ==             cycle        flatten!         permutation           sample        to_h\n      []             delete       frozen?          pop                   select        to_s\n      []=            delete_at    hash             product               select!       transpose\n      any?           delete_if    include?         push                  shift         uniq\n      assoc          dig          index            rassoc                shuffle       uniq!\n      at             drop         initialize       reject                shuffle!      unshift\n      bsearch        drop_while   initialize_copy  reject!               size          values_at\n      bsearch_index  each         insert           repeated_combination  slice         zip\n      clear          each_index   inspect          repeated_permutation  slice!        |\n      collect        empty?       join             replace               sort\n\nMethods are colored according to whether they're public, protected,\nprivate, undefined (using Module#undef_method), or overridden.\n\n(Undefined methods are not shown on MRI 2.3 due to interpreter limitations.)\n\nYou can hide, say, private methods like this:\n\n    irb\u003e [].ls :noprivate\n\nOr filter the list by Regexp:\n\n    irb\u003e [].ls /^to_/\n     =\u003e BasicObject\n    Kernel\n      to_enum  to_s\n    Looksee::ObjectMixin\n    Object\n      to_yaml  to_yaml_properties  to_yaml_style\n    Enumerable\n      to_a  to_set\n    Array\n      to_a  to_ary  to_s  to_yaml\n\n## Proxy objects\n\nObjects that delegate everything via `method_missing` to some other object can\nbe tricky, because they will delegate `ls` itself. To view such objects, you can\nalways do:\n\n    Looksee[object]\n\nThis will also work for `BasicObject` instances that don't have an `ls` method.\n`Object#ls` is simply a wrapper around `Looksee.[]`.\n\n## To the source!\n\nIf you want to know more about any of those methods, Looksee can\ntake you straight to the source in your editor:\n\n    [].ls.edit :to_set\n\nBy default, this uses `vi`; customize it like this:\n\n    # %f = file, %l = line number\n    Looksee.editor = \"mate -l%l %f\"\n\n## `ls` in your way?\n\nIf you have a library that for some reason can't handle an `ls` method existing\non `Object`, you may rename it like this:\n\n    Looksee.rename :_ls\n\n## Quick Reference\n\nWe've got one:\n\n    Looksee.help\n\nEnjoy!\n\n## Troubleshooting\n\n### ANSI Escapes\n\nIf your pager is not configured, you may see ugly output like this:\n\n    ESC[1;37mArrayESC[0m\n    ESC[1;32m\u0026ESC[0m ESC[1;32mcompact!ESC[0m ESC[1;32minclude?ESC[0m\n    ESC[1;32mrassocESC[0m ESC[1;32mto_aESC[0m\n\nThe most common pager is `less`, which you can configure by setting an\nenvironment variable like this in your shell configuration (usually\n`~/.bashrc`):\n\n    export LESS=-R\n\n## Contributing\n\n * [Bug reports](https://github.com/oggy/looksee/issues)\n * [Source](https://github.com/oggy/looksee)\n * Patches: Fork on Github, send pull request.\n   * Include tests where practical.\n   * Leave the version alone, or bump it in a separate commit.\n\n## Copyright\n\nCopyright (c) George Ogata. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foggy%2Flooksee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foggy%2Flooksee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foggy%2Flooksee/lists"}