Module: Slack::BlockKit::Composition::ConfirmationDialog::Confirmable

Overview

Confirmable contains the common behaviour for configuring a Slack::BlockKit::Composition::ConfirmationDialog

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



15
16
17
# File 'lib/slack/block_kit/composition/confirmation_dialog.rb', line 15

def self.included(klass)
  klass.attr_accessor :confirm
end

Instance Method Details

#confirmation_dialog {|confirm| ... } ⇒ Object

Yields:



19
20
21
22
23
24
25
# File 'lib/slack/block_kit/composition/confirmation_dialog.rb', line 19

def confirmation_dialog
  self.confirm = Composition::ConfirmationDialog.new

  yield(confirm) if block_given?

  self
end