Class: Hope::EventType

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.register(engine) ⇒ Object



13
14
15
# File 'lib/hope/event_type.rb', line 13

def self.register(engine)
  engine.add_epl(self.schema)
end

.schemaObject



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

def self.schema
  schema_name = self.name.split("::").last
  "create schema #{schema_name} as (#{properties.map { |k,v| [k,v].join(" ") }.join(", ")})"
end

Instance Method Details

#get(n) ⇒ Object



17
18
19
20
# File 'lib/hope/event_type.rb', line 17

def get n
  puts "getting #{n} from #{self.name}"
  self.send n.to_sym
end