Class: UI::ImageAttachment

Inherits:
BaseUiElement show all
Defined in:
lib/ui/image_attachment.rb

Overview

Instance Method Summary collapse

Methods inherited from BaseUiElement

#build, #send

Constructor Details

#initialize(url) ⇒ ImageAttachment

Returns a new instance of ImageAttachment.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ui/image_attachment.rb', line 5

def initialize(url)
  @template = {
    recipient: {
      id: nil
    },
    message: {
      attachment: {
        type: 'image',
        payload: {
          url: url
        }
      }
    }
  }
end