Class: Seh::EventType

Inherits:
Object
  • Object
show all
Defined in:
lib/seh/event_type.rb

Defined Under Namespace

Classes: And, Not, Or

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ EventType

Returns a new instance of EventType.



3
4
5
# File 'lib/seh/event_type.rb', line 3

def initialize type
  @type = type
end

Instance Method Details

#match(types) ⇒ Object

Parameters:

  • types —
    • an Array of types


8
9
10
11
# File 'lib/seh/event_type.rb', line 8

def match types
  return true if @type.nil? # define nil to match everything
  types.include? @type
end