class Croudia::Identity

Attributes

id[R]
id_str[R]

Public Class Methods

new(*) click to toggle source
Calls superclass method Croudia::Base::new
# File lib/croudia/identity.rb, line 10
def initialize(*)
  super
  raise ArgumentError, 'argument must have an "id" key' unless id
  @attrs['id_str'] ||= id.to_s
end

Public Instance Methods

==(other) click to toggle source

@param [Croudia::Identity] other @return [Boolean]

Calls superclass method
# File lib/croudia/identity.rb, line 18
def ==(other)
  super || self.class == other.class && id == other.id
end