RubyGems Navigation menu

seh 0.1.0

Structured event handler. Pure ruby event handling similar to w3c dom events; alpha wip. Lots of bells and whistles to support complex event handling as required by stuff like video games. Event handling in a synchronous specific order. Events 'bubble', and event targets can have multiple parents and common ancestors. Staged event callbacks: event.before { 'the united states of' }; event.after { 'america' }. Staged callbacks allow an ancestor to influence affect of event on a descendant: ancestor.before { |event| event.damage *= 2 }; descendant.after { |event| player.health -= event.damage }. Events use 'tag-style' types: event.type :hostile ; event.type :spell. Handle only events which pass a filter: player.bind( Seh::and :hostile, Seh::not( :spell ) ) { |event| 'Hostile non-spell!!' }. Optional event failure: event.fail; event.success { 'yay!' }; event.failure { 'oops!' }. Event inherits from OpenStruct for dynamic properties: event.omgs = 'omgs a dynamic attribute'

Gemfile:
= Copy to clipboard Copied!

install:
=

Versions:

  1. 0.3.0 - January 07, 2013 (15.5 KB)
  2. 0.1.0 - June 19, 2011 (7 KB)
  3. 0.0.3 - June 17, 2011 (6.5 KB)
  4. 0.0.2 - June 16, 2011 (6 KB)
  5. 0.0.1 - June 15, 2011 (5.5 KB)

Owners:

Authors:

  • Ryan Berckmans

SHA 256 checksum:

= Copy to clipboard Copied!

Total downloads 15,915

For this version 3,043

Licenses:

N/A

Required Ruby Version: None

Links: