Class: RSwim::UpdateEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/rswim/update_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_stateObject (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_numberObject (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_idObject (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_countObject (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

#statusObject (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