Class: ServiceObjects::Listener
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ServiceObjects::Listener
- Defined in:
- lib/service_objects/listener.rb
Overview
The base class for service listeners
Class Method Summary collapse
-
.finalize ⇒ self
Calls #otherwise in case no existing method has been checked.
-
.new(object) ⇒ ServiceObjects::Listener
Listener object constructor.
-
.otherwise ⇒ undefined
abstract
The method called by #finalize when no other method has been checked.
-
.respond_to? ⇒ Boolean
Checks whether the method is defined.
Class Method Details
.finalize ⇒ self
Calls #otherwise in case no existing method has been checked
77 78 79 80 81 |
# File 'lib/service_objects/listener.rb', line 77 def finalize otherwise unless @notified self end |
.new(object) ⇒ ServiceObjects::Listener
Listener object constructor
Decorates given object by adding methods to be called by service objects
|
|
# File 'lib/service_objects/listener.rb', line 14
|
.otherwise ⇒ undefined
This method is abstract.
The method called by #finalize when no other method has been checked
38 39 |
# File 'lib/service_objects/listener.rb', line 38 def otherwise end |
.respond_to? ⇒ Boolean
Checks whether the method is defined
Remembers the fact that any defined method has been checked
91 92 93 |
# File 'lib/service_objects/listener.rb', line 91 def respond_to?(*) super ? (@notified = true) : false end |