Class: Raml::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/raml/parser.rb,
lib/raml/parser/include.rb

Defined Under Namespace

Classes: Include

Class Method Summary collapse

Class Method Details

.parse(data, file_dir = Dir.getwd) ⇒ Object



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

def parse(data, file_dir=Dir.getwd)
  register_include_tag
  
  data = YAML.load data
  expand_includes data, file_dir

  Root.new data
end