Nov 12, 2007
Generic-user-small Gamont 1 post

Topic: Programming Ruby / class <<Time ?

i find about class <<obj>
but the example file (not that in book) about condition variable shows this inner class:

class <<Time alias old_now now def now old_now.to_f * FACTOR end
end

And running the code Time.now uses this definition.

I would like some explanation how this works.

thanks !

1 post