Class: RSwim::Member::ForwardingState::Ready
- Defined in:
- lib/rswim/member/forwarding_state/ready.rb
Instance Method Summary collapse
- #advance(_elapsed_seconds) ⇒ Object
- #forward_ack_to_member ⇒ Object
-
#initialize(id, node_member_id) ⇒ Ready
constructor
A new instance of Ready.
Methods inherited from Base
Constructor Details
#initialize(id, node_member_id) ⇒ Ready
Returns a new instance of Ready.
7 8 9 10 |
# File 'lib/rswim/member/forwarding_state/ready.rb', line 7 def initialize(id, node_member_id) super @activated = false end |
Instance Method Details
#advance(_elapsed_seconds) ⇒ Object
16 17 18 19 20 |
# File 'lib/rswim/member/forwarding_state/ready.rb', line 16 def advance(_elapsed_seconds) if @activated then ForwardingAck.new(@id, @node_member_id) else self end end |
#forward_ack_to_member ⇒ Object
12 13 14 |
# File 'lib/rswim/member/forwarding_state/ready.rb', line 12 def forward_ack_to_member @activated = true end |