K
Kurt V. Hindenburg
Hello,
I have this code. It works fine but I would like to use round_to_interval!.
I could not figure out how to code that. Any suggestions?
class Time
def round_to_interval!
# how?
end
def round_to_interval
self - (self.min % 10) * 60
end
end
Regards,
Kurt
I have this code. It works fine but I would like to use round_to_interval!.
I could not figure out how to code that. Any suggestions?
class Time
def round_to_interval!
# how?
end
def round_to_interval
self - (self.min % 10) * 60
end
end
Regards,
Kurt