Method: Checkpoint::Agent#==

Defined in:
lib/checkpoint/agent.rb

#==(other) ⇒ Boolean

Check whether two Agents refer to the same concrete actor by type and id.

Parameters:

  • other (Agent)

    Another Agent to compare with

Returns:

  • (Boolean)

    true when the other Agent's type and id are equal.



90
91
92
# File 'lib/checkpoint/agent.rb', line 90

def ==(other)
  other.is_a?(Agent) && type == other.type && id == other.id
end