struct Slack::UI::Blocks::Section
- Slack::UI::Blocks::Section
- Slack::UI::Block
- Struct
- Value
- Object
Overview
https://api.slack.com/reference/block-kit/blocks#section
Slack Section Blocks have several behavioral differences based on whether the content of the section is a single text block or multiple blocks.
Defined in:
slack/ui/blocks/section.crConstant Summary
-
ASSIGNED_TYPES =
[accessory : BlockElement | ::Nil, block_id : String | ::Nil, fields : Array(FieldText) | ::Nil, text : Text | ::Nil, type : String = "section"] of TypeDeclaration
-
https://api.slack.com/reference/block-kit/blocks#section
Slack Section Blocks have several behavioral differences based on whether the content of the section is a single text block or multiple blocks.
Constructors
-
.new(pull : JSON::PullParser)
https://api.slack.com/reference/block-kit/blocks#section
-
.new(accessory : BlockElement | Nil = nil, block_id : String | Nil = nil, fields : Array(FieldText) | Nil = nil, text : Text | Nil = nil, type : String = "section")
https://api.slack.com/reference/block-kit/blocks#section
Instance Method Summary
- #accessory : BlockElement | Nil
- #accessory=(accessory : BlockElement | Nil)
-
#after_initialize
Defines validations that prevent Sections from being created: - Some form of text is required - Arrays of text can only have 10 text objects.
- #block_id : String | Nil
- #block_id=(block_id : String | Nil)
- #fields : Array(FieldText) | Nil
- #fields=(fields : Array(FieldText) | Nil)
- #text : Text | Nil
- #text=(text : Text | Nil)
- #to_json(json : JSON::Builder)
- #type : String
- #type=(type : String)
Constructor methods inherited from struct Slack::UI::Block
new(pull : JSON::PullParser)
new
Constructor Detail
https://api.slack.com/reference/block-kit/blocks#section
Slack Section Blocks have several behavioral differences based on whether the content of the section is a single text block or multiple blocks.
https://api.slack.com/reference/block-kit/blocks#section
Slack Section Blocks have several behavioral differences based on whether the content of the section is a single text block or multiple blocks.
Instance Method Detail
Defines validations that prevent Sections from being created:
- Some form of text is required
- Arrays of text can only have 10 text objects.