class SchemaRD::SchemaParser
Public Class Methods
new(filename)
click to toggle source
# File lib/schemard/schema_parser.rb, line 83 def initialize(filename) @filename = filename end
Public Instance Methods
parse(with_comment: false)
click to toggle source
# File lib/schemard/schema_parser.rb, line 86 def parse(with_comment: false) Schema.new.tap do |schema| File.open(@filename) do |file| MigrationContext::Loader.new(schema, with_comment: with_comment).instance_eval(file.read, @filename) end end end