G
Gamont Gamont
Im see this example and i didnt understand how it works.
I dont find doc abou this construct.
I find about object-specific class (class <<a), but here
its a class.
class <<Time
alias old_now now
def now
old_now.to_f * FACTOR
end
end
and when this statement executes
Time.now, it calls the method in anonymous class and
no more in Time class.
How this works ?
thanks
I dont find doc abou this construct.
I find about object-specific class (class <<a), but here
its a class.
class <<Time
alias old_now now
def now
old_now.to_f * FACTOR
end
end
and when this statement executes
Time.now, it calls the method in anonymous class and
no more in Time class.
How this works ?
thanks