Class: YPS::Parser

Inherits:
Psych::Parser
  • Object
show all
Defined in:
lib/yps/parser.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Parser

Returns a new instance of Parser.



32
33
34
# File 'lib/yps/parser.rb', line 32

def initialize(&)
  super(Handler.new(&))
end

Class Method Details

.parse(yaml, filename) ⇒ Object



28
29
30
# File 'lib/yps/parser.rb', line 28

def self.parse(yaml, filename, &)
  new(&).parse(yaml, filename)
end

Instance Method Details

#parse(yaml, filename) ⇒ Object



36
37
38
39
# File 'lib/yps/parser.rb', line 36

def parse(yaml, filename)
  @handler.filename = filename
  super
end