Class: LogStash::Config::AST::Else

Inherits:
Node
  • Object
show all
Defined in:
lib/logstash/config/config_ast.rb

Instance Method Summary collapse

Instance Method Details

#compileObject



266
267
268
269
270
# File 'lib/logstash/config/config_ast.rb', line 266

def compile
  children = recursive_inject { |e| e.is_a?(Branch) || e.is_a?(Plugin) }
  return "else\n" \
    << children.collect(&:compile).map { |s| s.split("\n", -1).map { |l| "  " + l }.join("\n") }.join("") << "\n"
end