Class: Slack::BlockKit::Layout::RichText::RichTextElements::Emoji
- Inherits:
-
Object
- Object
- Slack::BlockKit::Layout::RichText::RichTextElements::Emoji
- Defined in:
- lib/slack/block_kit/layout/rich_text/rich_text_elements/emoji.rb
Overview
Constant Summary collapse
- TYPE =
'emoji'
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(name:) ⇒ Emoji
constructor
A new instance of Emoji.
Constructor Details
#initialize(name:) ⇒ Emoji
Returns a new instance of Emoji.
12 13 14 |
# File 'lib/slack/block_kit/layout/rich_text/rich_text_elements/emoji.rb', line 12 def initialize(name:) @name = name end |
Instance Method Details
#as_json ⇒ Object
16 17 18 19 20 21 |
# File 'lib/slack/block_kit/layout/rich_text/rich_text_elements/emoji.rb', line 16 def as_json(*) { type: TYPE, name: @name }.compact end |