Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/kevinsawicki/seajects
- Owner: kevinsawicki
- Created: 2011-06-12T23:51:42.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-11-20T23:20:45.000Z (almost 13 years ago)
- Last Synced: 2024-10-17T17:51:45.063Z (26 days ago)
- Language: Ruby
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)