Class: Slack::BlockKit::Element::ExternalSelectElement
- Inherits:
-
SelectElement
- Object
- Slack::BlockKit::Element
- SelectElement
- Slack::BlockKit::Element::ExternalSelectElement
- Defined in:
- lib/slack/block_kit/element/external_select_element.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#initial_option ⇒ Object
Returns the value of attribute initial_option.
-
#min_query_length ⇒ Object
Returns the value of attribute min_query_length.
Attributes inherited from SelectElement
Attributes inherited from Slack::BlockKit::Element
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SelectElement
Methods inherited from Slack::BlockKit::Element
Instance Attribute Details
#initial_option ⇒ Object
Returns the value of attribute initial_option.
8 9 10 |
# File 'lib/slack/block_kit/element/external_select_element.rb', line 8 def initial_option @initial_option end |
#min_query_length ⇒ Object
Returns the value of attribute min_query_length.
8 9 10 |
# File 'lib/slack/block_kit/element/external_select_element.rb', line 8 def min_query_length @min_query_length end |
Class Method Details
.populate(hash, object) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/slack/block_kit/element/external_select_element.rb', line 10 def self.populate(hash, object) object.initial_option = hash[:initial_option] if hash.key?(:initial_option) object.min_query_length = hash[:min_query_length] if hash.key?(:min_query_length) super(hash, object) end |
Instance Method Details
#to_h ⇒ Object
29 30 31 32 33 34 |
# File 'lib/slack/block_kit/element/external_select_element.rb', line 29 def to_h super.merge( initial_option: initial_option&.to_h, min_query_length: min_query_length || 3 ).compact end |