Class: Muxi::Webhook::ContentItem
- Inherits:
-
Struct
- Object
- Struct
- Muxi::Webhook::ContentItem
- Defined in:
- lib/muxi/webhook.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#text ⇒ Object
Returns the value of attribute text.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file
17 18 19 |
# File 'lib/muxi/webhook.rb', line 17 def file @file end |
#text ⇒ Object
Returns the value of attribute text
17 18 19 |
# File 'lib/muxi/webhook.rb', line 17 def text @text end |
#type ⇒ Object
Returns the value of attribute type
17 18 19 |
# File 'lib/muxi/webhook.rb', line 17 def type @type end |
Class Method Details
.from_hash(data) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/muxi/webhook.rb', line 18 def self.from_hash(data) new( type: data["type"] || "text", text: data["text"], file: data["file"] ) end |