Method: SafeCompleteCode#initialize

Defined in:
ext/ae-editor/ae-editor.rb

#initialize(_editor, _row, _col) ⇒ SafeCompleteCode

Returns a new instance of SafeCompleteCode.



359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
# File 'ext/ae-editor/ae-editor.rb', line 359

def initialize(_editor, _row, _col)
  @editor = _editor
  @source = _editor.text_value
  #@file = _file
  @row = _row.to_i
  @col = _col.to_i
  if _editor && _editor.has_ctags?
    tmp_file = _editor.create_temp_file
    begin
      @ss = RubyCtagsSourceStructure.new(tmp_file, _editor.ctags_string)
    ensure
      File.delete(tmp_file)
    end
  else
    @ss = RubySourceStructure.new(_source)
  end
  @filter=''
  @words = Array.new
  process_source
end