1- # ReplCompletion
1+ # ReplTypeCompletor
22
3- ReplCompletion is a type based completor for REPL.
3+ ReplTypeCompletor is a type based completor for REPL.
44It uses RBS type information, performs static type analytics, uses dynamic runtime information from binding.
55
66## Installation
@@ -19,20 +19,20 @@ If bundler is not being used to manage dependencies, install the gem by executin
1919
2020Require the library
2121``` ruby
22- require ' repl_completion '
22+ require ' repl_type_completor '
2323```
2424
2525Load RBS with one of these. It will load core library signatures, ` ./rbs_collection.yaml ` and ` ./sig/**/*.rbs ` .
2626``` ruby
27- ReplCompletion .preload_rbs # Recommended. Preload using thread
28- ReplCompletion .load_rbs # Could take a seconds in large projects
27+ ReplTypeCompletor .preload_rbs # Recommended. Preload using thread
28+ ReplTypeCompletor .load_rbs # Could take a seconds in large projects
2929```
3030
3131Now you can get completion candidates.
3232``` ruby
3333array = [1 , 2 , 3 ]
3434class String ; def upupup ; end ; end
35- result = ReplCompletion .analyze(' array.map do str = _1.chr; str.up' , binding: binding )
35+ result = ReplTypeCompletor .analyze(' array.map do str = _1.chr; str.up' , binding: binding )
3636result.completion_candidates # => ["case", "case!", "to", "upup"]
3737result.doc_namespace(' case' ) # => "String#upcase"
3838```
@@ -45,16 +45,16 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
4545
4646## Contributing
4747
48- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME ] /repl_completion .
48+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME ] /repl_type_completor .
4949
5050When something is wrong, these methods will provide some debug information.
5151``` ruby
52- ReplCompletion .info
53- ReplCompletion .rbs_load_started?
54- ReplCompletion .rbs_loaded?
55- ReplCompletion .rbs_load_error
56- ReplCompletion .last_completion_error
57- ReplCompletion .analyze(code_to_complete, binding: binding )
52+ ReplTypeCompletor .info
53+ ReplTypeCompletor .rbs_load_started?
54+ ReplTypeCompletor .rbs_loaded?
55+ ReplTypeCompletor .rbs_load_error
56+ ReplTypeCompletor .last_completion_error
57+ ReplTypeCompletor .analyze(code_to_complete, binding: binding )
5858```
5959
6060## License
0 commit comments