class Cura::Event::Middleware::Translator::Base
The base class for event middleware which detects multiple events and dispatches a new one when found.
Public Instance Methods
call(options={})
click to toggle source
Call this middleware.
@param [#to_h] options @option options [Event::Dispatcher] :dispatcher @option options [Event::Base] :event
# File lib/cura/event/middleware/translator/base.rb, line 14 def call(options={}) translate_event(options) if should_translate?(options) end
Protected Instance Methods
should_translate?(_options={})
click to toggle source
# File lib/cura/event/middleware/translator/base.rb, line 20 def should_translate?(_options={}) false end
translate_event(_options={})
click to toggle source
# File lib/cura/event/middleware/translator/base.rb, line 24 def translate_event(_options={}) # Does nothing on purpose end