| Class | Numeric |
| In: |
lib/facet/bytes.rb
lib/facet/times.rb |
| Parent: | Object |
Additions to Numeric class
Calculates time after a given time. Default time is now. Reads best with argument: 10.minutes.after(time)
Calculates time before a given time. Default time is now. Reads best with arguments: 10.days.before( Time.now - 1.day )
Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes. The base unit for all of these Numeric bytes methods is bytes. (One might expect it to be bits, but that doesn’t seem to be the general consensus.)
Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years. The base unit for all of these Numeric time methods is seconds.