Module: Slack::BlockKit::ExecutionContext

Defined in:
lib/slack/block_kit/execution_context.rb

Overview

TO USE: include Slack::Messages::Blocks::ExecutionContext data = [ SectionBlock[text: Text[mrkdwn: ‘wheeee’]] ] Slack::Messages::Blocks::ExecutionContext.test(data)

> {

  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "wheeee"
      }
    }
  ]
}

This can be copied and pasted into api.slack.com/tools/block-kit-builder

Constant Summary collapse

ActionsBlock =
Block::ActionsBlock
ContextBlock =
Block::ContextBlock
DividerBlock =
Block::DividerBlock
ImageBlock =
Block::ImageBlock
SectionBlock =
Block::SectionBlock
ConfirmationDialog =
CompositionObjects::ConfirmationDialog
Filter =
CompositionObjects::Filter
Option =
CompositionObjects::Option
OptionGroup =
CompositionObjects::OptionGroup
Text =
CompositionObjects::Text
ButtonElement =
Element::ButtonElement
DatePickerElement =
Element::DatePickerElement
ImageElement =
Element::ImageElement
OverflowElement =
Element::OverflowElement
ConversationsSelectElement =
Element::ConversationsSelectElement
ChannelsSelectElement =
Element::ChannelsSelectElement
ExternalSelectElement =
Element::ExternalSelectElement
StaticSelectElement =
Element::StaticSelectElement
UsersSelectElement =
Element::UsersSelectElement
MultiConversationsSelectElement =
Element::MultiConversationsSelectElement
MultiChannelsSelectElement =
Element::MultiChannelsSelectElement
MultiExternalSelectElement =
Element::MultiExternalSelectElement
MultiStaticSelectElement =
Element::MultiStaticSelectElement
MultiUsersSelectElement =
Element::MultiUsersSelectElement
Bold =
proc { |string| "*#{string}*" }
Italic =
proc { |string| "_#{string}_" }
Strike =
proc { |string| "~#{string}~" }
Code =
proc { |string| "`#{string}`" }
proc { |link, label = nil| label.nil? || label.empty? ? link : "<#{link}|#{label}>" }
Emoji =
proc { |string| ":#{string}:" }
CodeBlock =
proc { |&block| [ '```', yield, '```' ].join(Text::NEWLINE) }

Instance Method Summary collapse

Instance Method Details

#DividerBlockObject



28
29
30
# File 'lib/slack/block_kit/execution_context.rb', line 28

def DividerBlock
  DividerBlock[]
end