class LogStash::Filters::Dictionary::YamlFile
Protected Instance Methods
initialize_for_file_type()
click to toggle source
# File lib/logstash/filters/dictionary/yaml_file.rb, line 10 def initialize_for_file_type @visitor = YamlVisitor.create end
read_file_into_dictionary()
click to toggle source
# File lib/logstash/filters/dictionary/yaml_file.rb, line 14 def read_file_into_dictionary # low level YAML read that tries to create as # few intermediate objects as possible # this overwrites the value at key @visitor.accept_with_dictionary( @dictionary, Psych.parse_stream( IO.read(@dictionary_path, :mode => 'r:bom|utf-8') )) end