Sha256: ae6060c30002a73064cc74b5e04ca33e0191c26883386363c6b674a2ea209102
Contents?: true
Size: 1.25 KB
Versions: 7
Compression:
Stored size: 1.25 KB
Contents
# frozen_string_literal: true module Slack module BlockKit module Composition # An object that defines a dialog that provides a confirmation step to any # interactive element. This dialog will ask the user to confirm their # action by offering confirm and deny buttons. # # https://api.slack.com/reference/messaging/composition-objects#confirm class ConfirmationDialog def title(text:, emoji: nil) @title = PlainText.new(text: text, emoji: emoji) self end def confirm(text:, emoji: nil) @confirm = PlainText.new(text: text, emoji: emoji) self end def deny(text:, emoji: nil) @deny = PlainText.new(text: text, emoji: emoji) self end def plain_text(text:, emoji: nil) @text = PlainText.new(text: text, emoji: emoji) self end def mrkdwn(text:, verbatim: nil) @text = Mrkdwn.new(text: text, verbatim: verbatim) self end def as_json(*) { title: @title.as_json, text: @text.as_json, confirm: @confirm.as_json, deny: @deny.as_json } end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems