class LogStash::Filters::Dictionary::YamlVisitor

Constants

TAG_MAP_TABLE

Public Instance Methods

accept_with_dictionary(dictionary, target) click to toggle source
# File lib/logstash/filters/dictionary/yaml_visitor.rb, line 18
def accept_with_dictionary(dictionary, target)
  @dictionary = dictionary
  @map_depth = 0
  accept(target)
end
visit_Psych_Nodes_Mapping(o) click to toggle source
Calls superclass method
# File lib/logstash/filters/dictionary/yaml_visitor.rb, line 24
def visit_Psych_Nodes_Mapping(o)
  if Psych.load_tags[o.tag]
    return revive(resolve_class(Psych.load_tags[o.tag]), o)
  end

  target_hash = @map_depth == 0 ? @dictionary : {}
  @map_depth = @map_depth.succ

  if TAG_MAP_TABLE[o.tag]
    result = revive_hash(register(o, target_hash), o)
  else
    result = super(o)
  end

  @map_depth = @map_depth.pred
  result
end