From: Brian Candler Date: 2009-05-28T00:05:38+09:00 Subject: Re: String representing relative file name, adding (meta) data? Markus Fischer wrote: > > def method_missing(m, *args, &blk) > > @name.send(m, *args, &blk) > > end > > That's wonderful, I integrated this and now the rest of my code is less > cluttered and suddenly the class works in cases I haven't thought of. > Very nice, thank you! For more hidden goodness, you may also want to override respond_to? alias :orig_respond_to? :respond_to? def respond_to?(*m) orig_respond_to?(*m) || @name.respond_to?(*m) end -- Posted via http://www.ruby-forum.com/.