Class: Slack::BlockKit::Composition::Mrkdwn
- Inherits:
-
Object
- Object
- Slack::BlockKit::Composition::Mrkdwn
- Defined in:
- lib/slack/block_kit/composition/mrkdwn.rb
Overview
An object containing some text, formatted using Slack’s “mrkdwn”.
api.slack.com/reference/messaging/composition-objects#text api.slack.com/messaging/composing/formatting
Constant Summary collapse
- TYPE =
'mrkdwn'
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(text:, verbatim: nil) ⇒ Mrkdwn
constructor
A new instance of Mrkdwn.
Constructor Details
#initialize(text:, verbatim: nil) ⇒ Mrkdwn
Returns a new instance of Mrkdwn.
13 14 15 16 |
# File 'lib/slack/block_kit/composition/mrkdwn.rb', line 13 def initialize(text:, verbatim: nil) @text = text @verbatim = verbatim end |
Instance Method Details
#as_json ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/slack/block_kit/composition/mrkdwn.rb', line 18 def as_json(*) { type: TYPE, text: @text, verbatim: @verbatim }.compact end |