Class: Discordrb::Webhooks::EmbedImage
- Inherits:
-
Object
- Object
- Discordrb::Webhooks::EmbedImage
- Defined in:
- lib/discordrb/webhooks/embeds.rb
Overview
An embed's image will be displayed at the bottom, in large format. It will replace a footer icon URL if one is set.
Instance Attribute Summary collapse
-
#url ⇒ String?
URL of the image.
Instance Method Summary collapse
-
#initialize(url: nil) ⇒ EmbedImage
constructor
Creates a new image object.
-
#to_hash ⇒ Hash
A hash representation of this embed image, to be converted to JSON.
Constructor Details
#initialize(url: nil) ⇒ EmbedImage
Creates a new image object.
157 158 159 |
# File 'lib/discordrb/webhooks/embeds.rb', line 157 def initialize(url: nil) @url = url end |
Instance Attribute Details
#url ⇒ String?
Returns URL of the image.
153 154 155 |
# File 'lib/discordrb/webhooks/embeds.rb', line 153 def url @url end |
Instance Method Details
#to_hash ⇒ Hash
Returns a hash representation of this embed image, to be converted to JSON.
162 163 164 165 166 |
# File 'lib/discordrb/webhooks/embeds.rb', line 162 def to_hash { url: @url } end |