Project Site - callback.rubyforge.org Rubyforge Project - rubyforge.org/projects/callback
Installation
Install Fast Json as a gem.
gem install callback
Testing and Examples
To run the specs type:
$ ruby spec/spec_suite.rb
Author
Brian Takita <[email protected]>
License
GNU General Public License (GPL)
Example Use
require ‘callback’
class AnObject
include Callback
def
notify_callbacks(:before_lunch, 1, 2) do |error|
#error handler
raise error
end
end
end
obj = AnObject.new obj.define_callback(:before_lunch) do
puts "go to bank"
end method_notifying_callbacks.method_notifying_callbacks # go to bank