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
- #componenets ⇒ 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.
Instance Attribute Details
#componenets ⇒ Array<Button> (readonly)
27 28 29 |
# File 'lib/discordrb/data/component.rb', line 27 def componenets @componenets end |
Instance Method Details
#buttons ⇒ Array<Button>
Get all buttons in this row
42 43 44 |
# File 'lib/discordrb/data/component.rb', line 42 def select { |component| component.is_a? Button } end |
#each(&block) ⇒ Object
Iterate over each component in the row.
36 37 38 |
# File 'lib/discordrb/data/component.rb', line 36 def each(&block) @componenets.each(&block) end |