Class: DatabaseSchemaOwnership::Parser::RubyParser

Inherits:
DatabaseSchemaOwnership::Parser show all
Defined in:
lib/database_schema_ownership/parser/ruby_parser.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from DatabaseSchemaOwnership::Parser

#schema_path

Instance Method Summary collapse

Methods inherited from DatabaseSchemaOwnership::Parser

for, #initialize, #parse, #schema

Constructor Details

This class inherits a constructor from DatabaseSchemaOwnership::Parser

Instance Method Details

#rulesObject



6
7
8
9
10
11
# File 'lib/database_schema_ownership/parser/ruby_parser.rb', line 6

def rules
  [
    /\n*(\s+create_table "([^"]*)".*?end)/m,
    /\n*(\s+add_foreign_key "([^"]*)", "([^"]*)")/
  ]
end