From: Charles Steinman Date: 2005-06-05T11:40:25+09:00 Subject: Re: Package, a future replacement for setup.rb and mkmf.rb Jim Freeze wrote: > * Christian Neukirchen [2005-06-05 07:59:15 +0900]: > > > In Ruby, this would maybe look like that: > > > > require 'package' > > > > setup { > > name "Distutils" > > version "0.1.1" > > description "Python Module Distribution Utilities" > > author "Greg Ward" > > author_email "gward@python.net" > > url "http://www.python.org/sigs/distutils-sig/" > > > > packages ['distutils', 'distutils/command'] > > } > > If you have #name(arg) do the same thing as #name=(arg), how > does one get access to the instance variable? That isn't too hard to implement. def variable(*args) @variable = args.first unless args.empty? @variable end Now we can be even more like Smalltalk! Seriously, though, I think a Hash would both make more sense there (if I understand correctly what it's doing) and be more Ruby-like than hacking the setter syntax in a block. Though I guess maybe people don't like typing equals signs. I don't know.