Class: Slack::BlockKit::Layout::Divider

Inherits:
Object
  • Object
show all
Defined in:
lib/slack/block_kit/layout/divider.rb

Overview

A content divider, like an <hr>, to split up different blocks inside of a message.

api.slack.com/reference/messaging/blocks#divider

Constant Summary collapse

TYPE =
'divider'

Instance Method Summary collapse

Constructor Details

#initialize(block_id: nil) ⇒ Divider

Returns a new instance of Divider.



13
14
15
# File 'lib/slack/block_kit/layout/divider.rb', line 13

def initialize(block_id: nil)
  @block_id = block_id
end

Instance Method Details

#as_jsonObject



17
18
19
20
21
22
# File 'lib/slack/block_kit/layout/divider.rb', line 17

def as_json(*)
  {
    type: TYPE,
    block_id: @block_id
  }.compact
end