Class: Rubycord::Events::ServerRoleCreateEventHandler
- Inherits:
-
EventHandler
- Object
- EventHandler
- Rubycord::Events::ServerRoleCreateEventHandler
- Defined in:
- lib/rubycord/events/roles.rb
Overview
Event handler for ServerRoleCreateEvent
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from EventHandler
#after_call, #call, #initialize, #match, #matches_all
Constructor Details
This class inherits a constructor from Rubycord::Events::EventHandler
Instance Method Details
#matches?(event) ⇒ Boolean
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/rubycord/events/roles.rb', line 31 def matches?(event) # Check for the proper event type return false unless event.is_a? ServerRoleCreateEvent [ matches_all(@attributes[:name], event.name) do |a, e| a == if a.is_a? String e.to_s else e end end ].reduce(true, &:&) end |