Class: Slack::BlockKit::Element::UsersSelectElement

Inherits:
SelectElement show all
Defined in:
lib/slack/block_kit/element/users_select_element.rb

Direct Known Subclasses

MultiUsersSelectElement

Instance Attribute Summary collapse

Attributes inherited from SelectElement

#confirm, #placeholder

Attributes inherited from Slack::BlockKit::Element

#action_id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SelectElement

#valid?

Methods inherited from Slack::BlockKit::Element

[], #type, #valid?

Instance Attribute Details

#initial_userObject

Returns the value of attribute initial_user.



8
9
10
# File 'lib/slack/block_kit/element/users_select_element.rb', line 8

def initial_user
  @initial_user
end

Class Method Details

.populate(hash, object) ⇒ Object



10
11
12
13
14
# File 'lib/slack/block_kit/element/users_select_element.rb', line 10

def self.populate(hash, object)
  object.initial_user = hash[:initial_user] if hash.key?(:initial_user)

  super(hash, object)
end

Instance Method Details

#to_hObject



16
17
18
19
20
# File 'lib/slack/block_kit/element/users_select_element.rb', line 16

def to_h
  super.merge(
    initial_user: initial_user
  ).compact
end