Module: LogStash::PluginMixins::EventSupport::EventFactoryAdapter
- Defined in:
- lib/logstash/plugin_mixins/event_support/event_factory_adapter.rb
Defined Under Namespace
Modules: FallbackImpl
Class Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 41 42 |
# File 'lib/logstash/plugin_mixins/event_support/event_factory_adapter.rb', line 40 def self.extended(base) fail(ArgumentError, "`#{self}` cannot be extended into an existing object (#{base.inspect})") end |
.included(base) ⇒ void
This method returns an undefined value.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/logstash/plugin_mixins/event_support/event_factory_adapter.rb', line 20 def self.included(base) fail(ArgumentError, "`#{base}` must inherit LogStash::Plugin") unless base < LogStash::Plugin if defined? LogStash::Plugins::EventFactorySupport core_event_support = LogStash::Plugins::EventFactorySupport fail(ArgumentError, "`#{base}` should include #{core_event_support}") unless base < core_event_support else unless const_defined?(:FallbackImpl) require_relative 'event_factory_adapter/fallback_impl' private_constant :FallbackImpl end base.send(:include, FallbackImpl) end end |