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

callback :before_lunch

def method_notifying_callbacks
  notify_before_lunch("Joe", "Suzy") do |error|
    # This is the error handler
    raise error
  end
end

end

obj = AnObject.new obj.before_lunch do |man, woman|

puts "#{man} and #{woman} go to the bank."

end obj.method_notifying_callbacks # Joe and Suzy go to the bank.