Sha256: b3e828997dd78289a4927229153f3319058a1d8d805178fcbeb79fd64d572cd7
Contents?: true
Size: 210 Bytes
Versions: 10
Compression:
Stored size: 210 Bytes
Contents
class Time # Truncate time at give range (in seconds). # # t = Time.now # t = t.trunc(60*60) # t.min #=> 0 # t.sec #=> 0 # def trunc(amount) self - (self.to_i % amount) end end
Version data entries
10 entries across 9 versions & 2 rubygems