Class: Brujula::YamlParser

Inherits:
Object
  • Object
show all
Defined in:
lib/brujula/yaml_parser.rb

Class Method Summary collapse

Class Method Details

.load(string) ⇒ Object



55
56
57
58
59
60
61
62
63
64
# File 'lib/brujula/yaml_parser.rb', line 55

def load(string)
 handler = Brujula::LineNumberHandler.new
 parser  = Psych::Parser.new(handler)

 handler.parser = parser

 parser.parse string

 handler.root.to_ruby.first
end