From: Tanner Burson Date: 2006-04-14T01:26:24+09:00 Subject: Re: Equivalent of Java static code block in Ruby? ------=_Part_22544_18293835.1144945580235 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/13/06, azrael@cream.org wrote: > > > > > I think all you would do by adding another division here, is confuse > > matters. Currently I think it's pretty clear. > > > > I think I agree with you. One shouldn't do stuff simply because that's > the way Java does it. If anything, quite the opposite. > > Although, it's not true that all code in a class is executed at class > load time. Most of the code typically will only be called on > instantiation of an object, and sometimes it's helpful not to mix the > two up too thoroughly. Other than code inside of methods what are you referring to? irb(main):031:0> class Blah irb(main):032:1> attr_reader :asdf irb(main):033:1> end irb(main):034:0> p Blah.instance_methods.include?("asdf") true Martin > > -- =3D=3D=3DTanner Burson=3D=3D=3D tanner.burson@gmail.com http://tannerburson.com <---Might even work one day... ------=_Part_22544_18293835.1144945580235--