Module: Kwalify::Yaml

Module | Kwalify::Yaml
In: | kwalify/parser/yaml.rb kwalify.rb

### Methods

load load_file

### Classes and Modules

Class Kwalify::Yaml::Parser

### Public Class methods

load(yaml_str, opts={})

read yaml_str, parse it, and return yaml document.

opts: ::validator: Kwalify::Validator object ::preceding_aliass: allow preceding alias if true ::data_binding: enable data binding if true ::untabify: expand tab chars if true ::filename: filename

[Source]

    # File kwalify.rb, line 45
        def self.load(yaml_str, opts={})
          #require 'kwalify/parser/yaml'
          parser = Kwalify::Yaml::Parser.new(opts[:validator])
          parser.preceding_alias = true if opts[:preceding_alias]
          parser.data_binding    = true if opts[:data_binding]
          yaml_str = Kwalify::Util.untabify(yaml_str) if opts[:untabify]
          ydoc = parser.parse(yaml_str, :filename=>opts[:filename])
          return ydoc
        end

load_file(filename, opts={})

read file, parse it, and return yaml document. see Kwalify::Yaml::Parser.load()

[Source]

    # File kwalify.rb, line 57
        def self.load_file(filename, opts={})
          opts[:filename] = filename
          return self.load(File.read(filename), opts)
        end

[Validate]