Class: Discordrb::Poll::Media
- Inherits:
-
Object
- Object
- Discordrb::Poll::Media
- Defined in:
- lib/discordrb/data/poll.rb
Overview
Represents display-data for a poll.
Instance Attribute Summary collapse
-
#emoji ⇒ Emoji?
readonly
The emoji of the poll media.
-
#text ⇒ String?
readonly
The text of the poll media.
Instance Method Summary collapse
-
#==(other) ⇒ true, false
(also: #eql?)
Check if two poll media objects are equivalent.
Instance Attribute Details
#emoji ⇒ Emoji? (readonly)
Returns the emoji of the poll media.
235 236 237 |
# File 'lib/discordrb/data/poll.rb', line 235 def emoji @emoji end |
#text ⇒ String? (readonly)
Returns the text of the poll media.
232 233 234 |
# File 'lib/discordrb/data/poll.rb', line 232 def text @text end |
Instance Method Details
#==(other) ⇒ true, false Also known as: eql?
Check if two poll media objects are equivalent.
247 248 249 250 251 |
# File 'lib/discordrb/data/poll.rb', line 247 def ==(other) return false unless other.is_a?(Media) @text == other.text && @emoji == other.emoji end |