Class: Discorb::UnicodeEmoji
Overview
Represents a unicode emoji (default emoji) in discord.
Instance Attribute Summary collapse
-
#name -> String
readonly
The name 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.
Instance Attribute Details
#name -> String (readonly)
Returns The name of the emoji. (e.g. :grinning:).
179 180 181 |
# File 'lib/discorb/emoji.rb', line 179 def name @name end |
#value -> String (readonly)
Returns The unicode value of the emoji. (e.g. U+1F600).
181 182 183 |
# File 'lib/discorb/emoji.rb', line 181 def value @value end |
Instance Method Details
#inspect -> Object
210 211 212 |
# File 'lib/discorb/emoji.rb', line 210 def inspect "#<#{self.class} :#{@name}:>" end |
#to_s -> String
Returns The unicode string of the emoji.
197 198 199 |
# File 'lib/discorb/emoji.rb', line 197 def to_s @value end |
#to_uri -> String
Format the emoji for URI.
206 207 208 |
# File 'lib/discorb/emoji.rb', line 206 def to_uri URI.encode_www_form_component(@value) end |