module Slack::BlockKit

Constants

VERSION

Public Instance Methods

blocks() { |blocks| ... } click to toggle source
# File lib/slack/block_kit.rb, line 19
def blocks
  blocks = Blocks.new

  yield(blocks) if block_given?

  blocks
end
home(blocks: nil, private_metadata: nil, callback_id: nil, external_id: nil) { |home_surface| ... } click to toggle source
# File lib/slack/block_kit.rb, line 27
def home(blocks: nil,
         private_metadata: nil, callback_id: nil, external_id: nil)
  home_surface = Slack::Surfaces::Home.new(blocks: blocks,
                                           private_metadata: private_metadata,
                                           callback_id: callback_id,
                                           external_id: external_id)

  yield(home_surface) if block_given?

  home_surface
end
message(blocks: nil, channel: nil, thread_ts: nil, as_user: nil, text: nil) { |message_surface| ... } click to toggle source
# File lib/slack/block_kit.rb, line 56
def message(blocks: nil, channel: nil, thread_ts: nil, as_user: nil, text: nil)
  message_surface = Slack::Surfaces::Message.new(
    blocks: blocks,
    channel: channel,
    thread_ts: thread_ts,
    text: text,
    as_user: as_user
  )

  yield(message_surface) if block_given?

  message_surface
end
modal(title: nil, blocks: nil, private_metadata: nil, callback_id: nil, external_id: nil, clear_on_close: nil, notify_on_close: nil) { |modal_surface| ... } click to toggle source