Class: Slack::BlockKit::Composition::ConversationFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/slack/block_kit/composition/conversation_filter.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(only: nil, exclude_external_shared_channels: nil, exclude_bot_users: nil) ⇒ ConversationFilter

Returns a new instance of ConversationFilter.



15
16
17
18
19
20
21
# File 'lib/slack/block_kit/composition/conversation_filter.rb', line 15

def initialize(only: nil,
               exclude_external_shared_channels: nil,
               exclude_bot_users: nil)
  @only = only
  @exclude_external_shared_channels = exclude_external_shared_channels
  @exclude_bot_users = exclude_bot_users
end

Instance Method Details

#as_jsonObject



23
24
25
26
27
28
29
# File 'lib/slack/block_kit/composition/conversation_filter.rb', line 23

def as_json(*)
  {
    include: @only,
    exclude_external_shared_channels: @exclude_external_shared_channels,
    exclude_bot_users: @exclude_bot_users
  }.compact
end