class Discordrb::Events::AwaitEventHandler

Event handler for {AwaitEvent}

Public Instance Methods

matches?(event) click to toggle source
# File lib/discordrb/events/await.rb, line 38
def matches?(event)
  # Check for the proper event type
  return false unless event.is_a? AwaitEvent

  [
    matches_all(@attributes[:key], event.key) { |a, e| a == e },
    matches_all(@attributes[:type], event.type) { |a, e| a == e }
  ].reduce(true, &:&)
end