Class: Wisper::ValueObjects::Events Private
- Inherits:
-
Object
- Object
- Wisper::ValueObjects::Events
- Defined in:
- lib/wisper/value_objects/events.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Describes allowed events
Duck-types the argument to quack like array of strings when responding to the #include? method call.
Class Method Summary collapse
-
.initialize(list) ⇒ undefined
private
Initializes a ‘list’ of events.
Instance Method Summary collapse
-
#include?(event) ⇒ Boolean
private
Check if given event is ‘included’ to the ‘list’ of events.
-
#new(on) ⇒ undefined
Initializes a ‘list’ of events.
Class Method Details
.initialize(list) ⇒ undefined
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.
Initializes a ‘list’ of events
19 20 21 |
# File 'lib/wisper/value_objects/events.rb', line 19 def initialize(list) @list = list end |
Instance Method Details
#include?(event) ⇒ Boolean
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.
Check if given event is ‘included’ to the ‘list’ of events
28 29 30 |
# File 'lib/wisper/value_objects/events.rb', line 28 def include?(event) appropriate_method.call(event.to_s) end |
#new(on) ⇒ undefined
Initializes a ‘list’ of events
19 20 21 |
# File 'lib/wisper/value_objects/events.rb', line 19 def initialize(list) @list = list end |