Class: Seh::EventType::Or

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

Overview

And

Instance Method Summary collapse

Constructor Details

#initialize(*types) ⇒ Or

Returns a new instance of Or.



26
27
28
29
# File 'lib/seh/event_type.rb', line 26

def initialize *types
  @types = []
  types.each { |t| t = EventType.new t unless t.kind_of? EventType ; @types << t }
end

Instance Method Details

#match(types) ⇒ Object



31
32
33
34
# File 'lib/seh/event_type.rb', line 31

def match types
  @types.each { |t| return true if t.match types }
  false
end