Class: Line::Bot::Message::Image
- Inherits:
-
Base
- Object
- Base
- Line::Bot::Message::Image
show all
- Defined in:
- lib/line/bot/message/image.rb
Instance Attribute Summary
Attributes inherited from Base
#attrs
Instance Method Summary
collapse
Methods inherited from Base
#[], #event_type, #initialize
Instance Method Details
#content ⇒ Object
8
9
10
11
12
13
14
15
|
# File 'lib/line/bot/message/image.rb', line 8
def content
{
contentType: ContentType::IMAGE,
toType: 1,
originalContentUrl: attrs[:image_url],
previewImageUrl: attrs[:preview_url],
}
end
|
#valid? ⇒ Boolean
17
18
19
|
# File 'lib/line/bot/message/image.rb', line 17
def valid?
attrs[:image_url] && attrs[:preview_url]
end
|