J
Jp Hastings-spital
I'm attempting to build an ETA class, essentially identical to Time, but
where new accepts a number of seconds from now and generates the
underlying Time object accordingly. Obviously I can't re-assign self, so
how should I do this?
What I'd like to do:
--
class ETA < Time
def initialize(seconds)
self = Time.new + seconds
end
end
where new accepts a number of seconds from now and generates the
underlying Time object accordingly. Obviously I can't re-assign self, so
how should I do this?
What I'd like to do:
--
class ETA < Time
def initialize(seconds)
self = Time.new + seconds
end
end