Class: RServiceBus2::TestBus
- Inherits:
-
Object
- Object
- RServiceBus2::TestBus
- Defined in:
- lib/rservicebus2/test/bus.rb
Overview
Test Bus
Instance Attribute Summary collapse
-
#log_list ⇒ Object
Returns the value of attribute log_list.
-
#publish_list ⇒ Object
Returns the value of attribute publish_list.
-
#reply_list ⇒ Object
Returns the value of attribute reply_list.
-
#saga_data ⇒ Object
Returns the value of attribute saga_data.
-
#send_list ⇒ Object
Returns the value of attribute send_list.
Instance Method Summary collapse
-
#initialize ⇒ TestBus
constructor
A new instance of TestBus.
- #log(string, verbose = false) ⇒ Object
- #publish(msg) ⇒ Object
- #reply(msg) ⇒ Object
- #send(msg) ⇒ Object
Constructor Details
#initialize ⇒ TestBus
Returns a new instance of TestBus.
6 7 8 9 10 11 |
# File 'lib/rservicebus2/test/bus.rb', line 6 def initialize @publish_list = [] @send_list = [] @reply_list = [] @log_list = [] end |
Instance Attribute Details
#log_list ⇒ Object
Returns the value of attribute log_list.
4 5 6 |
# File 'lib/rservicebus2/test/bus.rb', line 4 def log_list @log_list end |
#publish_list ⇒ Object
Returns the value of attribute publish_list.
4 5 6 |
# File 'lib/rservicebus2/test/bus.rb', line 4 def publish_list @publish_list end |
#reply_list ⇒ Object
Returns the value of attribute reply_list.
4 5 6 |
# File 'lib/rservicebus2/test/bus.rb', line 4 def reply_list @reply_list end |
#saga_data ⇒ Object
Returns the value of attribute saga_data.
4 5 6 |
# File 'lib/rservicebus2/test/bus.rb', line 4 def saga_data @saga_data end |
#send_list ⇒ Object
Returns the value of attribute send_list.
4 5 6 |
# File 'lib/rservicebus2/test/bus.rb', line 4 def send_list @send_list end |
Instance Method Details
#log(string, verbose = false) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/rservicebus2/test/bus.rb', line 25 def log(string, verbose = false) item = {} item['string'] = string item['verbose'] = verbose @log_list << item end |
#publish(msg) ⇒ Object
13 14 15 |
# File 'lib/rservicebus2/test/bus.rb', line 13 def publish(msg) @publish_list << msg end |
#reply(msg) ⇒ Object
21 22 23 |
# File 'lib/rservicebus2/test/bus.rb', line 21 def reply(msg) @reply_list << msg end |
#send(msg) ⇒ Object
17 18 19 |
# File 'lib/rservicebus2/test/bus.rb', line 17 def send(msg) @send_list << msg end |