Class: Goru::Bridge
- Inherits:
-
Object
show all
- Defined in:
- lib/goru/bridge.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(routine:, channel:) ⇒ Bridge
Returns a new instance of Bridge.
7
8
9
10
11
12
|
# File 'lib/goru/bridge.rb', line 7
def initialize(routine:, channel:)
@routine = routine
@channel = channel
@channel.add_observer(self)
update_status
end
|
Instance Attribute Details
#status ⇒ Object
16
17
18
|
# File 'lib/goru/bridge.rb', line 16
def status
@status
end
|
Instance Method Details
#channel_closed ⇒ Object
49
50
51
|
# File 'lib/goru/bridge.rb', line 49
def channel_closed
update_status
end
|
#channel_read ⇒ Object
45
46
47
|
# File 'lib/goru/bridge.rb', line 45
def channel_read
update_status
end
|
#channel_received ⇒ Object
41
42
43
|
# File 'lib/goru/bridge.rb', line 41
def channel_received
update_status
end
|
#update_status ⇒ Object
27
28
29
|
# File 'lib/goru/bridge.rb', line 27
def update_status
end
|