Sha256: 2b8811adb462995357aff730bc72fe81e70301681fc878b88f977bcb2c67dd8f

Contents?: true

Size: 327 Bytes

Versions: 3

Compression:

Stored size: 327 Bytes

Contents

$:.unshift File.expand_path("../../lib", __FILE__)
require "signal"

class Status
  include Signal

  def ready!
    emit(:ready)
  end
end

status = Status.new
status.before(:ready) { puts "Before the ready event!" }
status.on(:ready) { puts "I'm ready!" }
status.after(:ready) { puts "After the ready event!" }
status.ready!

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
signal-1.1.0 examples/blocks.rb
signal-0.1.1 examples/blocks.rb
signal-0.1.0 examples/blocks.rb