Sha256: a526c78f5afe8bc8d02a4d6ce8b86a5aef2406b42120c0a17e25f007f5239d64
Contents?: true
Size: 826 Bytes
Versions: 2
Compression:
Stored size: 826 Bytes
Contents
# frozen_string_literal: true module Slack module BlockKit module Layout class RichText module RichTextElements # https://api.slack.com/reference/block-kit/blocks#element-types class User include RichTextElements::StyleHelper TYPE = 'user' VALID_STYLES = %w[bold italic strike highlight client_highlight unlink].freeze def initialize(user_id:, styles: []) @user_id = user_id @styles = styles validate_styles(styles, VALID_STYLES) end def as_json(*) { type: TYPE, user_id: @user_id, style: styles_as_json(@styles) }.compact end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slack-ruby-block-kit-0.25.0 | lib/slack/block_kit/layout/rich_text/rich_text_elements/user.rb |
slack-ruby-block-kit-0.24.0 | lib/slack/block_kit/layout/rich_text/rich_text_elements/user.rb |