class Discorb::Embed::Footer
Represemts a footer of embed.
Attributes
icon[RW]
text[RW]
Public Class Methods
new(text, icon: nil)
click to toggle source
Initialize a new Footer
object.
@param [String] text The text of footer. @param [String] icon The icon url of footer.
# File lib/discorb/embed.rb, line 161 def initialize(text, icon: nil) @text = text @icon = icon end
Public Instance Methods
to_hash()
click to toggle source
Convert footer to hash.
@see discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure Offical Discord API Docs @return [Hash] Converted footer.
# File lib/discorb/embed.rb, line 172 def to_hash { text: @text, icon_url: @icon, } end