Monday, April 23, 2007
The best explanation of metaclasses in Ruby I've found
I stumbled across "seeingMetaclassesClearly.html " today. I don't know how I never came across it. It's definately the best explanation of metaclasses in Ruby I've ever read. Now the whole "class << obj; def meth; puts "hello from the metaclass"; end; end;" syntax makes sense. Previously I had used "obj.extend(module)" before but the former is obviously more convenient if you are in a class definition.
Subscribe to:
Post Comments (Atom)
About Me
Tags
- activerecord (1)
- camping (1)
- closures (1)
- cygwin (1)
- denver (1)
- drb (1)
- dsl (1)
- erlang (1)
- erlounge (1)
- fedora (8)
- freedom (1)
- FUDcon (1)
- GEB (3)
- git (1)
- gnu (1)
- gstreamer (1)
- hotmail (1)
- hpricot (1)
- java (1)
- jruby (1)
- kernel (1)
- kino (3)
- laptop (1)
- linux (3)
- machanize (1)
- meta programming (3)
- metaprogramming (1)
- mutt (2)
- open source (3)
- oss (1)
- pitivi (2)
- raleigh.rb (1)
- ruby (13)
- ruby curb hpricot (1)
- rubyconf (1)
- slashdot (1)
- svn (1)
- tux (1)
- ubuntu (1)
- unix (1)
- vim (1)
- vnc (1)
- windows (3)
No comments:
Post a Comment