Class: RSwim::UpdateEntry
- Inherits:
-
Object
- Object
- RSwim::UpdateEntry
- Defined in:
- lib/rswim/update_entry.rb
Instance Attribute Summary collapse
-
#custom_state ⇒ Object
readonly
Returns the value of attribute custom_state.
-
#incarnation_number ⇒ Object
readonly
Returns the value of attribute incarnation_number.
-
#member_id ⇒ Object
readonly
Returns the value of attribute member_id.
-
#propagation_count ⇒ Object
readonly
Returns the value of attribute propagation_count.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(member_id, status, incarnation_number, custom_state, propagation_count = 0) ⇒ UpdateEntry
constructor
A new instance of UpdateEntry.
Constructor Details
#initialize(member_id, status, incarnation_number, custom_state, propagation_count = 0) ⇒ UpdateEntry
Returns a new instance of UpdateEntry.
7 8 9 10 11 12 13 |
# File 'lib/rswim/update_entry.rb', line 7 def initialize(member_id, status, incarnation_number, custom_state, propagation_count = 0) @member_id = member_id @status = status @incarnation_number = incarnation_number @custom_state = custom_state @propagation_count = propagation_count end |
Instance Attribute Details
#custom_state ⇒ Object (readonly)
Returns the value of attribute custom_state.
5 6 7 |
# File 'lib/rswim/update_entry.rb', line 5 def custom_state @custom_state end |
#incarnation_number ⇒ Object (readonly)
Returns the value of attribute incarnation_number.
5 6 7 |
# File 'lib/rswim/update_entry.rb', line 5 def incarnation_number @incarnation_number end |
#member_id ⇒ Object (readonly)
Returns the value of attribute member_id.
5 6 7 |
# File 'lib/rswim/update_entry.rb', line 5 def member_id @member_id end |
#propagation_count ⇒ Object (readonly)
Returns the value of attribute propagation_count.
5 6 7 |
# File 'lib/rswim/update_entry.rb', line 5 def propagation_count @propagation_count end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/rswim/update_entry.rb', line 5 def status @status end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 18 19 |
# File 'lib/rswim/update_entry.rb', line 15 def ==(other) %i[member_id status incarnation_number propagation_count custom_state].all? do |a| send(a) == other.send(a) end end |