class Discordrb::Components::ActionRow
Represents a row of components
Attributes
components[R]
@return [Array<Button>]
Public Class Methods
new(data, bot)
click to toggle source
@!visibility private
# File lib/discordrb/data/component.rb, line 32 def initialize(data, bot) @bot = bot @components = data['components'].map { |component_data| Components.from_data(component_data, @bot) } end
Public Instance Methods
each(&block)
click to toggle source
Iterate over each component in the row.
# File lib/discordrb/data/component.rb, line 38 def each(&block) @components.each(&block) end
text_inputs()
click to toggle source
Get all buttons in this row @return [Array<Button>]
# File lib/discordrb/data/component.rb, line 50 def text_inputs select { |component| component.is_a? TextInput } end
to_a()
click to toggle source
@!visibility private
# File lib/discordrb/data/component.rb, line 55 def to_a @components end