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

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

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] }