Sha256: b44b9d67400c6804e30e32c6318061fde665f7c029cb2a5ed89714411f284146
Contents?: true
Size: 472 Bytes
Versions: 5
Compression:
Stored size: 472 Bytes
Contents
# frozen_string_literal: true class Time include Lite::Ruby::DateHelper include Lite::Ruby::TimeHelper class << self def elapse time = now.to_f yield now.to_f - time end end private def default_format 'year-month-day hour:minute' end def default_stamp :datetime_iso end def format_for(key) TIME_UNITS[key] || DATE_UNITS[key] end def stamp_for(key) TIME_STAMPS[key] || DATE_STAMPS[key] end end
Version data entries
5 entries across 5 versions & 1 rubygems