Class: Discordrb::Components::ActionRow
- Inherits:
-
Object
- Object
- Discordrb::Components::ActionRow
- Includes:
- Enumerable
- Defined in:
- lib/discordrb/data/component.rb
Overview
Represents a row of components.
Instance Attribute Summary collapse
-
#components ⇒ Array<Button>
readonly
The components contained within this action row.
-
#id ⇒ Integer
readonly
The numeric identifier of the action row.
Instance Method Summary collapse
-
#buttons ⇒ Array<Button>
Get all the buttons in this action row.
-
#each(&block) ⇒ Array, Enumerator
Iterate over each component in the row.
-
#text_inputs ⇒ Array<TextInput>
Get all the text inputs in this action row.
Instance Attribute Details
#components ⇒ Array<Button> (readonly)
Returns the components contained within this action row.
56 57 58 |
# File 'lib/discordrb/data/component.rb', line 56 def components @components end |
#id ⇒ Integer (readonly)
Returns the numeric identifier of the action row.
53 54 55 |
# File 'lib/discordrb/data/component.rb', line 53 def id @id end |
Instance Method Details
#buttons ⇒ Array<Button>
Get all the buttons in this action row.
73 74 75 |
# File 'lib/discordrb/data/component.rb', line 73 def select { |component| component.is_a?(Button) } end |
#each(&block) ⇒ Array, Enumerator
Iterate over each component in the row.
67 68 69 |
# File 'lib/discordrb/data/component.rb', line 67 def each(&block) @components.each(&block) end |