Class: Consumer::Substitute::Consumer
- Inherits:
-
Object
- Object
- Consumer::Substitute::Consumer
- Defined in:
- lib/consumer/substitute.rb
Instance Method Summary collapse
- #call(message_data) ⇒ Object
- #dispatched?(message_data = nil, &block) ⇒ Boolean
- #dispatched_messages ⇒ Object
Instance Method Details
#call(message_data) ⇒ Object
8 9 10 |
# File 'lib/consumer/substitute.rb', line 8 def call() << end |
#dispatched?(message_data = nil, &block) ⇒ Boolean
16 17 18 19 20 21 22 23 24 |
# File 'lib/consumer/substitute.rb', line 16 def dispatched?(=nil, &block) if .nil? block ||= proc { true } else block ||= proc { |msg| == msg } end .any?(&block) end |
#dispatched_messages ⇒ Object
12 13 14 |
# File 'lib/consumer/substitute.rb', line 12 def @dispatched_messages ||= [] end |