Class: LogStash::Config::File
- Inherits:
-
Object
- Object
- LogStash::Config::File
- Includes:
- Enumerable
- Defined in:
- lib/logstash/config/file.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(text) ⇒ File
constructor
A new instance of File.
-
#parse(text) ⇒ Object
def initialize.
-
#plugin(plugin_type, name, *args) ⇒ Object
def parse.
Constructor Details
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
11 12 13 |
# File 'lib/logstash/config/file.rb', line 11 def logger @logger end |
Instance Method Details
#each ⇒ Object
34 35 36 |
# File 'lib/logstash/config/file.rb', line 34 def each @config.recursive_select(LogStash::Config::AST::Plugin) end |
#parse(text) ⇒ Object
def initialize
20 21 22 23 24 25 26 27 |
# File 'lib/logstash/config/file.rb', line 20 def parse(text) grammar = LogStashConfigParser.new result = grammar.parse(text) if result.nil? raise LogStash::ConfigurationError, grammar.failure_reason end return result end |