@@ -31,9 +31,9 @@ ReplTypeCompletor.load_rbs # Could take a seconds in large projects
3131Now you can get completion candidates.
3232``` ruby
3333array = [1 , 2 , 3 ]
34- class String ; def upupup ; end ; end
35- result = ReplTypeCompletor .analyze(' array.map do str = _1.chr; str.up ' , binding: binding )
36- result.completion_candidates # => ["case", "case!", "to", "upup" ]
34+ code_to_complete = ' array.map do str = _1.chr; str.up '
35+ result = ReplTypeCompletor .analyze(code_to_complete , binding: binding , filename: __FILE__ )
36+ result.completion_candidates # => ["case", "case!", "to"]
3737result.doc_namespace(' case' ) # => "String#upcase"
3838```
3939
@@ -45,7 +45,7 @@ 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_type_completor.
48+ Bug reports and pull requests are welcome on GitHub at https://github.com/ruby /repl_type_completor .
4949
5050When something is wrong, these methods will provide some debug information.
5151``` ruby
@@ -54,7 +54,7 @@ ReplTypeCompletor.rbs_load_started?
5454ReplTypeCompletor .rbs_loaded?
5555ReplTypeCompletor .rbs_load_error
5656ReplTypeCompletor .last_completion_error
57- ReplTypeCompletor .analyze(code_to_complete, binding: binding )
57+ ReplTypeCompletor .analyze(code_to_complete, binding: binding , filename: __FILE__ )
5858```
5959
6060## License
0 commit comments