Class: RSwim::Member::Peer::CustomStateHolder
- Inherits:
-
Object
- Object
- RSwim::Member::Peer::CustomStateHolder
- Defined in:
- lib/rswim/member/peer.rb
Instance Attribute Summary collapse
-
#propagation_count ⇒ Object
readonly
Returns the value of attribute propagation_count.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
- #increment_propagation_count ⇒ Object
-
#initialize(id, node_member_id) ⇒ CustomStateHolder
constructor
A new instance of CustomStateHolder.
- #logger ⇒ Object
Constructor Details
#initialize(id, node_member_id) ⇒ CustomStateHolder
Returns a new instance of CustomStateHolder.
105 106 107 108 109 110 |
# File 'lib/rswim/member/peer.rb', line 105 def initialize(id, node_member_id) @id = id @node_member_id = node_member_id @state = {} @propagation_count = 0 end |
Instance Attribute Details
#propagation_count ⇒ Object (readonly)
Returns the value of attribute propagation_count.
103 104 105 |
# File 'lib/rswim/member/peer.rb', line 103 def propagation_count @propagation_count end |
#state ⇒ Object
Returns the value of attribute state.
103 104 105 |
# File 'lib/rswim/member/peer.rb', line 103 def state @state end |
Instance Method Details
#increment_propagation_count ⇒ Object
118 119 120 |
# File 'lib/rswim/member/peer.rb', line 118 def increment_propagation_count @propagation_count += 1 end |