Class: RSwim::Member::ForwardingState::Ready

Inherits:
Base
  • Object
show all
Defined in:
lib/rswim/member/forwarding_state/ready.rb

Instance Method Summary collapse

Methods inherited from Base

#prepare_output

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_memberObject



12
13
14
# File 'lib/rswim/member/forwarding_state/ready.rb', line 12

def forward_ack_to_member
  @activated = true
end