I writed simple gem named Inferno. It gives object the ability to bind and trigger custom named events. Events do not have to be declared before they are bound, and may take passed arguments.

Super simple example

events = Inferno::Event.new notifications.on("hello.world", self) { |payload| puts "Recived: #{payload}" } notifications.trigger("hello.world")

Source code

  • Last update: ( about 3 years ago )
  • Size: 180 Bytes

Comments