Class: Slack::BlockKit::Layout::RichText::RichTextElements::Emoji

Inherits:
Object
  • Object
show all
Defined in:
lib/slack/block_kit/layout/rich_text/rich_text_elements/emoji.rb

Overview

Constant Summary collapse

TYPE =
'emoji'

Instance Method Summary collapse

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_jsonObject



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