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

#componenetsArray<Button> (readonly)

Returns:



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

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