Class: Discorb::Embed::Footer
- Inherits:
-
Entry
- Object
- Entry
- Discorb::Embed::Footer
- Defined in:
- lib/discorb/embed.rb
Overview
Represemts a footer of embed.
Instance Attribute Summary collapse
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, icon: nil) ⇒ Footer
constructor
Initialize a new Footer object.
-
#to_hash ⇒ Hash
Convert footer to hash.
Constructor Details
#initialize(text, icon: nil) ⇒ Footer
Initialize a new Footer object.
213 214 215 216 |
# File 'lib/discorb/embed.rb', line 213 def initialize(text, icon: nil) @text = text @icon = icon end |
Instance Attribute Details
#icon ⇒ Object
Returns the value of attribute icon.
205 206 207 |
# File 'lib/discorb/embed.rb', line 205 def icon @icon end |
#text ⇒ Object
Returns the value of attribute text.
205 206 207 |
# File 'lib/discorb/embed.rb', line 205 def text @text end |
Instance Method Details
#to_hash ⇒ Hash
Convert footer to hash.
225 226 227 |
# File 'lib/discorb/embed.rb', line 225 def to_hash { text: @text, icon_url: @icon } end |