Class: LogStash::Filters::Ruby::Script::ExecutionContext
- Inherits:
-
Object
- Object
- LogStash::Filters::Ruby::Script::ExecutionContext
- Defined in:
- lib/logstash/filters/ruby/script/execution_context.rb
Overview
A blank area for our script to live in. Everything is instance_eval,exec‘d against this to eliminate instance var and method def conflicts against other objects
Instance Method Summary collapse
-
#initialize(name, logger) ⇒ ExecutionContext
constructor
A new instance of ExecutionContext.
- #logger ⇒ Object
- #register(params) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name, logger) ⇒ ExecutionContext
Returns a new instance of ExecutionContext.
6 7 8 9 10 |
# File 'lib/logstash/filters/ruby/script/execution_context.rb', line 6 def initialize(name, logger) # Namespaced with underscore so as not to conflict with anything the user sets @__name__ = name @__logger__ = logger end |
Instance Method Details
#logger ⇒ Object
12 13 14 |
# File 'lib/logstash/filters/ruby/script/execution_context.rb', line 12 def logger @__logger__ end |
#register(params) ⇒ Object
16 17 18 |
# File 'lib/logstash/filters/ruby/script/execution_context.rb', line 16 def register(params) logger.debug("skipping register since the script didn't define it") end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/logstash/filters/ruby/script/execution_context.rb', line 20 def to_s "<ExecutionContext #{@__name__}>" end |