From: ara.t.howard@... Date: 2006-07-13T00:40:01+09:00 Subject: [ANN] prototype-0.0.0 NAME prototype.rb URIS http://codeforpeople.com/lib/ruby/ http://rubyforge.org/projects/codeforpeople/ SYNOPSIS prototype.rb implements the prototype design pattern http://en.wikipedia.org/wiki/Prototype-based_programming for ruby WHY prototype based programming can look very nice ;-) EXAMPLES ~ > cat samples/a.rb require 'prototype' singleton = Prototype.new{ @a, @b = 40, 2 def answer() @a + @b end } p singleton.answer ~ > ruby samples/a.rb 42 ~ > cat samples/b.rb require 'prototype' DB = Prototype.new{ host 'localhost' port 4242 def connect() p [host, port] end } p DB.host p DB.port DB.connect ~ > ruby samples/b.rb "localhost" 4242 ["localhost", 4242] DOCS see lib/*rb samples/*rb comments and patches welcome! enjoy! -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama