Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kevinsawicki/seajects

Generate object models from ctags output
https://github.com/kevinsawicki/seajects

Last synced: 26 days ago
JSON representation

Generate object models from ctags output

Awesome Lists containing this project

README

        

# seajects - Generate object models from ctags

seajects parses the `ctags` output into a tree hierarchy.

## Examples

### Parse an existing file and find all methods

```ruby
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

```ruby
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](http://www.opensource.org/licenses/mit-license.php)