From: David Alan Black Date: 2001-10-24T19:49:46+09:00 Subject: [ruby-talk:23172] Re: enough about Python -- here's something fun in Ruby :-) Hello -- On Wed, 24 Oct 2001, ts wrote: > >>>>> "D" == David Alan Black writes: > > D> Thing.new.visible # => hi > D> Thing.new.hidden # => error: hidden method called > > Well, probably I'm stupid but what is the difference with > > class Thing > def visible > hidden > end > private > def hidden > puts "hi" > end > end All that my thing does is put private code in a block, which conceivably might be nice if you're moving things around and don't want to have "public" and "private" floating in the file. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav