Class: Yml2erd::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/yml2erd/parser.rb

Class Method Summary collapse

Class Method Details

.parse(path) ⇒ Object

returns an object of Yml2erd::SchemaStructure



9
10
11
12
13
14
# File 'lib/yml2erd/parser.rb', line 9

def parse(path)
  yml = YAML.load_file(path)
  ss = Yml2erd::SchemaStructure.new(yml)
  Yml2erd::SchemaStructure::Validator.new(ss).validate
  ss
end