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
Instance Method Summary collapse
-
#buttons ⇒ Array<Button>
Get all buttons in this row.
-
#each(&block) ⇒ Object
Iterate over each component in the row.
-
#text_inputs ⇒ Array<Button>
Get all buttons in this row.
Instance Attribute Details
#components ⇒ Array<Button> (readonly)
29 30 31 |
# File 'lib/discordrb/data/component.rb', line 29 def components @components end |
Instance Method Details
#buttons ⇒ Array<Button>
Get all buttons in this row
44 45 46 |
# File 'lib/discordrb/data/component.rb', line 44 def select { |component| component.is_a? Button } end |
#each(&block) ⇒ Object
Iterate over each component in the row.
38 39 40 |
# File 'lib/discordrb/data/component.rb', line 38 def each(&block) @components.each(&block) end |