Class: DiscordWebHooks::Embed
- Inherits:
-
Object
- Object
- DiscordWebHooks::Embed
- Defined in:
- lib/discord_webhooks/embed.rb
Instance Method Summary collapse
-
#initialize(title: "", description: "", color: 000000, author: {}, fields: [], footer: "", timestamp: "") ⇒ Embed
constructor
A new instance of Embed.
- #to_h ⇒ Object
Constructor Details
#initialize(title: "", description: "", color: 000000, author: {}, fields: [], footer: "", timestamp: "") ⇒ Embed
Returns a new instance of Embed.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/discord_webhooks/embed.rb', line 3 def initialize(title:"",description:"",color:000000,author:{},fields:[],footer:"",timestamp:"") @title = title @description = description @color = color = @fields = fields = = @hash = { title: @title, description: @description, color: @color, author: , fields: @fields, footer: , timestamp: } end |
Instance Method Details
#to_h ⇒ Object
23 24 25 |
# File 'lib/discord_webhooks/embed.rb', line 23 def to_h @hash end |