Class: RServiceBus2::TestBus

Inherits:
Object
  • Object
show all
Defined in:
lib/rservicebus2/test/bus.rb

Overview

Test Bus

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTestBus

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_listObject

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_listObject

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_listObject

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_dataObject

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_listObject

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