{"id":15032756,"url":"https://github.com/ruby/repl_type_completor","last_synced_at":"2025-04-05T15:03:27.272Z","repository":{"id":209702539,"uuid":"724535143","full_name":"ruby/repl_type_completor","owner":"ruby","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-16T06:29:33.000Z","size":197,"stargazers_count":32,"open_issues_count":2,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-29T14:04:56.841Z","etag":null,"topics":[],"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/ruby.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-28T09:26:27.000Z","updated_at":"2025-03-18T15:17:37.000Z","dependencies_parsed_at":"2023-12-29T06:27:42.616Z","dependency_job_id":"cce3ba91-0874-4f6a-aadf-85a3127ce211","html_url":"https://github.com/ruby/repl_type_completor","commit_stats":null,"previous_names":["ruby/repl_type_completor"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Frepl_type_completor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Frepl_type_completor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Frepl_type_completor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Frepl_type_completor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/repl_type_completor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353729,"owners_count":20925329,"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-09-24T20:19:22.699Z","updated_at":"2025-04-05T15:03:27.252Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReplTypeCompletor\n\nReplTypeCompletor is a type based completor for REPL.\nIt uses RBS type information, performs static type analytics, uses dynamic runtime information from binding.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    $ bundle add repl_type_completor\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install repl_type_completor\n\n## Usage\n\nRequire the library\n```ruby\nrequire 'repl_type_completor'\n```\n\nLoad RBS with one of these. It will load core library signatures, `./rbs_collection.yaml` and `./sig/**/*.rbs`.\n```ruby\nReplTypeCompletor.preload_rbs # Recommended. Preload using thread\nReplTypeCompletor.load_rbs # Could take a seconds in large projects\n```\n\nNow you can get completion candidates.\n```ruby\narray = [1, 2, 3]\ncode_to_complete = 'array.map do str = _1.chr; str.up'\nresult = ReplTypeCompletor.analyze(code_to_complete, binding: binding, filename: __FILE__)\nresult.completion_candidates #=\u003e [\"case\", \"case!\", \"to\"]\nresult.doc_namespace('case') #=\u003e \"String#upcase\"\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/repl_type_completor.\n\nWhen something is wrong, these methods will provide some debug information.\n```ruby\nReplTypeCompletor.info\nReplTypeCompletor.rbs_load_started?\nReplTypeCompletor.rbs_loaded?\nReplTypeCompletor.rbs_load_error\nReplTypeCompletor.last_completion_error\nReplTypeCompletor.analyze(code_to_complete, binding: binding, filename: __FILE__)\n```\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Frepl_type_completor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Frepl_type_completor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Frepl_type_completor/lists"}