[Nitro] Aspects

Trans transfire at gmail.com
Tue Aug 28 14:26:27 EDT 2007


What should this do?

   class X
     before :x do
       print "BEFORE:"
     end

     def x
       puts "x"
     end
   end

   X.new.x  #=> BEFORE:x

   class Y < X
     def x
       puts "y"
     end
   end

   Y.new.x  #=>  ?

Should it be 'BEFORE:y' or just 'y' b/c Y#x overrides everything in X?

T.



More information about the Nitro-general mailing list