Class: MessengerClient::URLImage
- Inherits:
-
Object
- Object
- MessengerClient::URLImage
- Defined in:
- lib/messenger_client/url_image.rb
Instance Method Summary collapse
-
#initialize(url) ⇒ URLImage
constructor
A new instance of URLImage.
- #to_json ⇒ Object
Constructor Details
#initialize(url) ⇒ URLImage
Returns a new instance of URLImage.
3 4 5 |
# File 'lib/messenger_client/url_image.rb', line 3 def initialize(url) @url = url end |
Instance Method Details
#to_json ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/messenger_client/url_image.rb', line 7 def to_json { attachment: { type: "image", payload: { url: @url } } } end |