Sha256: 4ad5f6b7215c74f6699fccd3be7ed5f836ad9c96020a85d6f0f8afdbb5f21994
Contents?: true
Size: 775 Bytes
Versions: 3
Compression:
Stored size: 775 Bytes
Contents
# -*- coding: utf-8 -*- require 'tengine/core' driver :driver23 do # イベントが発生したら:propertiesを指定してイベントを発火する on:event23 do puts "handler23" fire(:event23_0, :level => 0) end on(:event23_0){ puts "handler23_0"; fire(:event23_1, :level => 1) } on(:event23_1){ puts "handler23_1"; fire(:event23_2, :level => 2) } on(:event23_2){ puts "handler23_2"; fire(:event23_3, :level => 3) } on(:event23_3){ puts "handler23_3"; fire(:event23_4, :level => 4) } on(:event23_4){ puts "handler23_4"; fire(:event23_5, :level => 5) } on(:event23_5){ puts "handler23_5"; fire(:event23_6, :level => 6) } # [ArgumentError] Invalid level value. It must be one of [0, 1, 2, 3, 4, 5] on(:event23_6){ puts "handler23_6" } end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tengine_core-1.2.2 | examples/uc24_fire_with_level_key.rb~ |
tengine_core-1.2.1 | examples/uc24_fire_with_level_key.rb~ |
tengine_core-1.2.0 | examples/uc24_fire_with_level_key.rb~ |