Sha256: 73e5c68985b003a312e66911f83845d1084a05ed25f094a60c61162a52cd30e7

Contents?: true

Size: 614 Bytes

Versions: 15

Compression:

Stored size: 614 Bytes

Contents

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

# ハンドラ内では event メソッドを使って受け取ったイベントを取得する事が可能。
# イベントの属性については、Tengine::Core::Event を参照

driver :driver60 do
  on:event60 do
Tengine.logger.debug("*" * 100)
Tengine.logger.debug( "event: #{event.inspect}" )
    hash = {}
    [:event_type_name, :key, :source_name, :occurred_at,
      :level, :confirmed, :sender_name, :properties,].each do |attr_name|
      hash[attr_name.to_s] = event.send(attr_name)
    end
    puts "handler60: " << hash.to_a.sort.inspect
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
tengine_core-1.2.2 examples/uc60_event_in_handler.rb
tengine_core-1.2.1 examples/uc60_event_in_handler.rb
tengine_core-1.2.0 examples/uc60_event_in_handler.rb
tengine_core-1.1.0 examples/uc60_event_in_handler.rb
tengine_core-0.5.39 examples/uc60_event_in_handler.rb
tengine_core-0.5.38 examples/uc60_event_in_handler.rb
tengine_core-0.5.37 examples/uc60_event_in_handler.rb
tengine_core-0.5.36 examples/uc60_event_in_handler.rb
tengine_core-0.5.35 examples/uc60_event_in_handler.rb
tengine_core-0.5.34 examples/uc60_event_in_handler.rb
tengine_core-0.5.33 examples/uc60_event_in_handler.rb
tengine_core-0.5.32 examples/uc60_event_in_handler.rb
tengine_core-0.5.31 examples/uc60_event_in_handler.rb
tengine_core-0.5.30 examples/uc60_event_in_handler.rb
tengine_core-0.5.28 examples/uc60_event_in_handler.rb