Class: LogStashCompilerLSCLGrammar::LogStash::Compiler::LSCL::AST::Node

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Includes:
Helpers
Defined in:
lib/logstash/compiler/lscl.rb

Constant Summary

Constants included from Helpers

Helpers::AND_METHOD, Helpers::BOOLEAN_DSL_METHOD_SIGNATURE, Helpers::NAND_METHOD, Helpers::OR_METHOD, Helpers::XOR_METHOD

Instance Method Summary collapse

Methods included from Helpers

#base_id, #base_protocol, #base_source_with_metadata, #base_source_with_metadata=, #compose, #compose_for, #jdsl, jdsl, #line_and_column, #source_meta

Instance Method Details

#section_typeObject



17
18
19
20
21
22
23
24
# File 'lib/logstash/compiler/lscl.rb', line 17

def section_type
  if recursive_select_parent(Plugin).any?
    return "codec"
  else
    section = recursive_select_parent(PluginSection)
    return section.first.plugin_type.text_value
  end
end