Class: Discorb::UnicodeEmoji
Overview
Represents a unicode emoji (default emoji) in discord.
Instance Attribute Summary collapse
-
#name -> String
readonly
The name of the emoji.
-
#skin_tone -> Integer
readonly
The skin tone of the emoji.
-
#value -> String
readonly
The unicode value of the emoji.
Instance Method Summary collapse
- #inspect -> Object
-
#to_s -> String
The unicode string of the emoji.
-
#to_uri -> String
Format the emoji for URI.
Methods inherited from Emoji
Instance Attribute Details
#name -> String (readonly)
Returns The name of the emoji. (e.g. :grinning:).
188 189 190 |
# File 'lib/discorb/emoji.rb', line 188 def name @name end |
#skin_tone -> Integer (readonly)
Returns The skin tone of the emoji.
192 193 194 |
# File 'lib/discorb/emoji.rb', line 192 def skin_tone @skin_tone end |
#value -> String (readonly)
Returns The unicode value of the emoji. (e.g. U+1F600).
190 191 192 |
# File 'lib/discorb/emoji.rb', line 190 def value @value end |
Instance Method Details
#inspect -> Object
224 225 226 |
# File 'lib/discorb/emoji.rb', line 224 def inspect "#<#{self.class} :#{@name}:>" end |
#to_s -> String
Returns The unicode string of the emoji.
211 212 213 |
# File 'lib/discorb/emoji.rb', line 211 def to_s @value end |
#to_uri -> String
Format the emoji for URI.
220 221 222 |
# File 'lib/discorb/emoji.rb', line 220 def to_uri URI.encode_www_form_component(@value) end |