Class: CtagsSourceStructure

Inherits:
SourceStructure show all
Defined in:
ext/ae-editor/ae-editor.rb

Instance Attribute Summary

Attributes inherited from SourceStructure

#root

Instance Method Summary collapse

Methods inherited from SourceStructure

#class_node_by_line, #deep_node_by_line, #node_by_line

Constructor Details

#initialize(_file) ⇒ CtagsSourceStructure

Returns a new instance of CtagsSourceStructure.



89
90
91
92
93
# File 'ext/ae-editor/ae-editor.rb', line 89

def initialize(_file)
  super()
  @file = _file
  build_structure
end

Instance Method Details

#build_structureObject



95
96
97
98
99
100
# File 'ext/ae-editor/ae-editor.rb', line 95

def build_structure
  output = ctags
  output.each {|line|
    p line.split("\t")
  }
end

#ctagsObject



102
103
104
105
106
107
108
109
# File 'ext/ae-editor/ae-editor.rb', line 102

def ctags
  _cmd_ = "|ctags -x -u #{@file}"
  to_ret = ''
  open(_cmd_, "r"){|f| 
    to_ret = f.readlines
  }
  to_ret
end