Sha256: cbfbc638ca87d2f4579ed83e52ea917174880bd15feb062d3d00432ce39c4683

Contents?: true

Size: 492 Bytes

Versions: 1

Compression:

Stored size: 492 Bytes

Contents

require 'ostruct'

java_import 'com.espertech.esper.client.ConfigurationEventTypeLegacy'

module Hope
  class EventType < OpenStruct
    
    def self.schema
      schema_name = self.name.split("::").last
      "create schema #{schema_name} as (#{properties.map { |k,v| [k,v].join(" ") }.join(", ")})"
    end
    
    def self.register(engine)
      engine.add_epl(self.schema)
    end
    
    def get n
      puts "getting #{n} from #{self.name}"
      self.send n.to_sym
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hope-0.1.0-java lib/hope/event_type.rb