Module IRB::InputCompletor
In: lib/irb/completion.rb

Methods

Constants

ReservedWords = [ "BEGIN", "END", "alias", "and", "begin", "break", "case", "class", "def", "defined", "do", "else", "elsif", "end", "ensure", "false", "for", "if", "in", "module", "next", "nil", "not", "or", "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless", "until", "when", "while", "yield", ]
CompletionProc = proc { |input| bind = IRB.conf[:MAIN_CONTEXT].workspace.binding
Operators = ["%", "&", "*", "**", "+", "-", "/", "<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>", "[]", "[]=", "^",]

Public Class methods

[Source]

     # File lib/irb/completion.rb, line 187
187:     def self.select_message(receiver, message, candidates)
188:       candidates.grep(/^#{message}/).collect do |e|
189:         case e
190:         when /^[a-zA-Z_]/
191:           receiver + "." + e
192:         when /^[0-9]/
193:         when *Operators
194:           #receiver + " " + e
195:         end
196:       end
197:     end

[Validate]