class Rubygame::EventTriggers::KindOfTrigger
KindOfTrigger is an event trigger which fires when the event is kind of the given class or module. (In other words, when event.kind_of?( kind ) is true.)
Contrast with InstanceOfTrigger.
Public Class Methods
new( kind )
click to toggle source
Initialize a new instance of KindOfTrigger with the given class or module.
- kind
-
The class/module to check for. (Class or Module, required)
# File lib/rubygame/event_triggers.rb, line 489 def initialize( kind ) @kind = kind end
Public Instance Methods
match?( event )
click to toggle source
Returns true if the event is kind of the class/module.
# File lib/rubygame/event_triggers.rb, line 495 def match?( event ) event.kind_of?( @kind ) end