Sha256: 536d7548c9fde1f5c9936faa10236246cdf846e07d355f6c37153ecf868e80ed
Contents?: true
Size: 432 Bytes
Versions: 1
Compression:
Stored size: 432 Bytes
Contents
# frozen_string_literal: true $LOAD_PATH.unshift File.expand_path("../lib", __dir__) require "voltage" class Status include Voltage def ready! emit(:ready) end end class MyListener def before_ready puts "Before the ready event!" end def on_ready puts "I'm ready!" end def after_ready puts "After the ready event!" end end status = Status.new status.listeners << MyListener.new status.ready!
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
voltage-0.1.0 | examples/listener.rb |