Class: RubyCord::Emoji Abstract

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

Overview

This class is abstract.

Represents a Discord emoji.

Direct Known Subclasses

CustomEmoji, UnicodeEmoji

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



12
13
14
# File 'lib/rubycord/emoji.rb', line 12

def ==(other)
  eql?(other)
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/rubycord/emoji.rb', line 8

def eql?(other)
  other.is_a?(self.class) && other.to_uri == to_uri
end

#inspectObject



16
17
18
# File 'lib/rubycord/emoji.rb', line 16

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

#to_hashHash

Returns The hash represents the emoji.

Returns:

  • (Hash)

    The hash represents the emoji.

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/rubycord/emoji.rb', line 21

def to_hash
  raise NotImplementedError
end