Class: Tamiyo::YamlHelper::EventHandler

Inherits:
YAML::Handler
  • Object
show all
Defined in:
lib/tamiyo/yaml/yaml_helper.rb

Instance Method Summary collapse

Constructor Details

#initialize(queue) ⇒ EventHandler

Returns a new instance of EventHandler.



169
170
171
# File 'lib/tamiyo/yaml/yaml_helper.rb', line 169

def initialize(queue)
  @queue = queue
end

Instance Method Details

#end_sequenceObject Also known as: end_mapping



185
186
187
# File 'lib/tamiyo/yaml/yaml_helper.rb', line 185

def end_sequence
  @queue << [:end]
end

#scalar(value, anchor, tag, plain, quoted, style) ⇒ Object



173
174
175
# File 'lib/tamiyo/yaml/yaml_helper.rb', line 173

def scalar(value, anchor, tag, plain, quoted, style)
  @queue << [:scalar, value]
end

#start_mapping(anchor, tag, implicit, style) ⇒ Object



181
182
183
# File 'lib/tamiyo/yaml/yaml_helper.rb', line 181

def start_mapping(anchor, tag, implicit, style)
  @queue << [:map]
end

#start_sequence(anchor, tag, implicit, style) ⇒ Object



177
178
179
# File 'lib/tamiyo/yaml/yaml_helper.rb', line 177

def start_sequence(anchor, tag, implicit, style)
  @queue << [:seq]
end