Class: Goru::Bridge
- Inherits:
-
Object
show all
- Defined in:
- lib/goru/bridge.rb
Overview
Constant Summary
collapse
- STATUS_READY =
:ready
- STATUS_FINISHED =
:finished
- STATUS_IDLE =
:idle
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
28
29
30
|
# File 'lib/goru/bridge.rb', line 28
def status
@status
end
|
Instance Method Details
#channel_closed ⇒ Object
61
62
63
|
# File 'lib/goru/bridge.rb', line 61
def channel_closed
update_status
end
|
#channel_read ⇒ Object
57
58
59
|
# File 'lib/goru/bridge.rb', line 57
def channel_read
update_status
end
|
#channel_received ⇒ Object
53
54
55
|
# File 'lib/goru/bridge.rb', line 53
def channel_received
update_status
end
|
#update_status ⇒ Object
39
40
41
|
# File 'lib/goru/bridge.rb', line 39
def update_status
end
|