https://github.com/rubysolo/skeema
ActiveRecord schema.rb parser
https://github.com/rubysolo/skeema
Last synced: 4 months ago
JSON representation
ActiveRecord schema.rb parser
- Host: GitHub
- URL: https://github.com/rubysolo/skeema
- Owner: rubysolo
- License: mit
- Created: 2012-04-16T16:56:52.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-04-25T18:22:11.000Z (about 13 years ago)
- Last Synced: 2024-04-30T02:43:35.600Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 93.8 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Skeema
Three different implementations of parsing ActiveRecord schema.rb files
## Examples:
# use the regex-based implementation
Skeema::Regex.parse('path/to/schema.rb')
# => { 'authors' => ['name'], 'posts' => ['author_id', 'title', 'body'] }# use the instance_eval-based implementation
Skeema::Pretender.parse('path/to/schema.rb')
# => { :authors => [:name], :posts => [:author_id, :title, :body] }# use the ripper-based implementation
Skeema::Ripper.parse('path/to/schema.rb')
# => { :authors => [:name], :posts => [:author_id, :title, :body] }