Class: Fluent::Config::YamlParser::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/config/yaml_parser/parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, indent: 2) ⇒ Parser

Returns a new instance of Parser.



23
24
25
26
# File 'lib/fluent/config/yaml_parser/parser.rb', line 23

def initialize(config, indent: 2)
  @base_indent = indent
  @config = config
end

Instance Method Details

#buildObject



28
29
30
31
32
# File 'lib/fluent/config/yaml_parser/parser.rb', line 28

def build
  s = @config['system'] && system_config_build(@config['system'])
  c = @config['config'] && config_build(@config['config'], root: true)
  RootBuilder.new(s, c)
end