Method: Emfrp::Interpreter#completion_proc

Defined in:
lib/emfrp/interpreter/interpreter.rb

#completion_procObject



175
176
177
178
179
180
181
182
# File 'lib/emfrp/interpreter/interpreter.rb', line 175

def completion_proc
  command_comp = @command_manager.completion_proc
  proc do |s|
    token_candidates = lexical_tokens.select{|x| x.index(s) == 0}
    command_candidates = command_comp.call(s)
    token_candidates + command_candidates
  end
end