Class: RubyCord::DiscordModel Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycord/common.rb

Overview

This class is abstract.

Represents Discord model.

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/rubycord/common.rb', line 24

def ==(other)
  if respond_to?(:id) && other.respond_to?(:id)
    id == other.id
  else
    super
  end
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/rubycord/common.rb', line 20

def eql?(other)
  self == other
end

#inspectObject



32
33
34
# File 'lib/rubycord/common.rb', line 32

def inspect
  "#<#{self.class}: #{@id}>"
end