Class: RSwim::Member::ForwardingState::ForwardingAck
- Defined in:
- lib/rswim/member/forwarding_state/forwarding_ack.rb
Instance Method Summary collapse
- #advance(elapsed_seconds) ⇒ Object
-
#initialize(id, node_member_id) ⇒ ForwardingAck
constructor
A new instance of ForwardingAck.
- #prepare_output ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(id, node_member_id) ⇒ ForwardingAck
7 8 9 10 |
# File 'lib/rswim/member/forwarding_state/forwarding_ack.rb', line 7 def initialize(id, node_member_id) super @done = false end |
Instance Method Details
#advance(elapsed_seconds) ⇒ Object
18 19 20 21 22 |
# File 'lib/rswim/member/forwarding_state/forwarding_ack.rb', line 18 def advance(elapsed_seconds) if @done then Ready.new(@id, @node_member_id) else self end end |
#prepare_output ⇒ Object
12 13 14 15 16 |
# File 'lib/rswim/member/forwarding_state/forwarding_ack.rb', line 12 def prepare_output @done = true = Message.new(@id, @node_member_id, :ack) [] end |