class WipeOut::Callback
Attributes
block[R]
name[R]
Public Class Methods
new(name, block)
click to toggle source
# File lib/wipe_out/callback.rb, line 5 def initialize(name, block) @name = name.to_sym @block = block end
Public Instance Methods
==(other)
click to toggle source
# File lib/wipe_out/callback.rb, line 16 def ==(other) name == other.name && block == other.block end
run(execution)
click to toggle source
# File lib/wipe_out/callback.rb, line 10 def run(execution) raise("Wrong arity for callback name=#{name}") if block.arity != 1 block.call(execution) end