Class: Slack::BlockKit::Layout::Divider
- Inherits:
-
Object
- Object
- Slack::BlockKit::Layout::Divider
- 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.
Constant Summary collapse
- TYPE =
'divider'
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(block_id: nil) ⇒ Divider
constructor
A new instance of Divider.
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_json ⇒ Object
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 |