Generate object models from ctags output
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
seajects
README.md

README.md

seajects - Generate object models from ctags

seajects parses the ctags output into a tree hierarchy.

Examples

Parse an existing file and find all methods

tags = Seajects.from_file '/data/src/Buffer.cpp'
methods = tags.find_all do |tag|
  'method' == tag.name
end

Parse raw content and print classes found

content = "class Stream\n"
content += "class Buffer\n"
content += "end\n"
content += "end\n"
tags = Seajects.from_content "stream.rb", content
tags.each do |tag|
  puts "Class #{tag.name} at line #{tag.line}" if 'class' == tag.type
end

License

MIT License