Sha256: 187e92996497ff0b15d8ab167ffcd5309daf63e81e4844c122937f9883b3f7d2
Contents?: true
Size: 197 Bytes
Versions: 15
Compression:
Stored size: 197 Bytes
Contents
class Time # Truncate time at give range (in seconds). # # t = Time.now # => # t.trunc(60*60) # 1 hour # => # def trunc(amount) self - (self.to_i % amount) end end
Version data entries
15 entries across 15 versions & 2 rubygems