Sha256: 4d58e361328e54ad9f3b7fe94d39716f50c1eca98e753faa1bce125e0cda6909

Contents?: true

Size: 401 Bytes

Versions: 11

Compression:

Stored size: 401 Bytes

Contents

# -*- coding: utf-8 -*-
require 'tengine/core'

class Tengine::Core::EventWrapper

  def initialize(source)
    @source = source
  end

  [:event_type_name, :key, :source_name, :occurred_at,
    :level, :confirmed, :sender_name, :properties,].each do |attr_name|
    class_eval(<<-EOS)
      def #{attr_name}; @source.#{attr_name}; end
    EOS
  end

  def [](key)
    properties[key.to_s]
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
tengine_core-0.5.39 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.38 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.37 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.36 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.35 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.34 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.33 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.32 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.31 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.30 lib/tengine/core/event_wrapper.rb
tengine_core-0.5.28 lib/tengine/core/event_wrapper.rb