Class: Discorb::Emoji Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/discorb/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



13
14
15
# File 'lib/discorb/emoji.rb', line 13

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

#eql?(other) -> Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/discorb/emoji.rb', line 9

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

#inspect -> Object



17
18
19
# File 'lib/discorb/emoji.rb', line 17

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

#to_hash -> Hash

Returns The hash represents the emoji.

Returns:

  • (Hash)

    The hash represents the emoji.

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/discorb/emoji.rb', line 22

def to_hash
  raise NotImplementedError
end