class Slack::BlockKit::Element::Image
An element to insert an image - this element can be used in section and context blocks only. If you want a block with only an image in it, you're looking for the image block. (Slack::BlockKit::Layout::Image
)
Constants
- TYPE
Public Class Methods
new(image_url:, alt_text:)
click to toggle source
# File lib/slack/block_kit/element/image.rb, line 14 def initialize(image_url:, alt_text:) @image_url = image_url @alt_text = alt_text end
Public Instance Methods
as_json(*)
click to toggle source
# File lib/slack/block_kit/element/image.rb, line 19 def as_json(*) { type: TYPE, image_url: @image_url, alt_text: @alt_text } end