Class: Rubycord::Webhooks::EmbedThumbnail
- Inherits:
-
Object
- Object
- Rubycord::Webhooks::EmbedThumbnail
- Defined in:
- lib/rubycord/webhooks/embeds.rb
Overview
An embed’s thumbnail will be displayed at the right of the message, next to the description and fields. When clicked it will point to the embed URL.
Instance Attribute Summary collapse
-
#url ⇒ String?
URL of the thumbnail.
Instance Method Summary collapse
-
#initialize(url: nil) ⇒ EmbedThumbnail
constructor
Creates a new thumbnail object.
-
#to_hash ⇒ Hash
A hash representation of this embed thumbnail, to be converted to JSON.
Constructor Details
#initialize(url: nil) ⇒ EmbedThumbnail
Creates a new thumbnail object.
175 176 177 |
# File 'lib/rubycord/webhooks/embeds.rb', line 175 def initialize(url: nil) @url = url end |
Instance Attribute Details
#url ⇒ String?
Returns URL of the thumbnail.
171 172 173 |
# File 'lib/rubycord/webhooks/embeds.rb', line 171 def url @url end |
Instance Method Details
#to_hash ⇒ Hash
Returns a hash representation of this embed thumbnail, to be converted to JSON.
180 181 182 183 184 |
# File 'lib/rubycord/webhooks/embeds.rb', line 180 def to_hash { url: @url } end |