Class: Discordrb::Components::ActionRow

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/discordrb/data/component.rb

Overview

Represents a row of components

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#componentsArray<Button> (readonly)

Returns:



27
28
29
# File 'lib/discordrb/data/component.rb', line 27

def components
  @components
end

Instance Method Details

#buttonsArray<Button>

Get all buttons in this row

Returns:



42
43
44
# File 'lib/discordrb/data/component.rb', line 42

def buttons
  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)
  @components.each(&block)
end