Class: Slack::BlockKit::Element::ChannelsSelectElement
Instance Attribute Summary collapse
#confirm, #placeholder
#action_id
Class Method Summary
collapse
Instance Method Summary
collapse
#valid?
[], #type, #valid?
Instance Attribute Details
#initial_channel ⇒ Object
Returns the value of attribute initial_channel.
8
9
10
|
# File 'lib/slack/block_kit/element/channels_select_element.rb', line 8
def initial_channel
@initial_channel
end
|
#response_url_enabled ⇒ Object
Returns the value of attribute response_url_enabled.
8
9
10
|
# File 'lib/slack/block_kit/element/channels_select_element.rb', line 8
def response_url_enabled
@response_url_enabled
end
|
Class Method Details
.populate(hash, object) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/slack/block_kit/element/channels_select_element.rb', line 11
def self.populate(hash, object)
object.initial_channel = hash[:initial_channel] if hash.key?(:initial_channel)
object.response_url_enabled! if hash.key?(:response_url_enabled)
super(hash, object)
end
|
Instance Method Details
#response_url_enabled! ⇒ Object
18
19
20
|
# File 'lib/slack/block_kit/element/channels_select_element.rb', line 18
def response_url_enabled!
@response_url_enabled = true
end
|
#to_h ⇒ Object
22
23
24
25
26
27
|
# File 'lib/slack/block_kit/element/channels_select_element.rb', line 22
def to_h
super.merge(
initial_channel: initial_channel,
response_url_enabled: response_url_enabled
).compact
end
|