Module: Workbox::Time
- Defined in:
- lib/workbox/time.rb
Overview
Time provides basic time functionality. It requires the including class or module to implement ‘to_i’ and return a number.
Instance Method Summary collapse
- #days ⇒ Object (also: #day)
- #hours ⇒ Object (also: #hour)
- #minutes ⇒ Object (also: #minute)
Instance Method Details
#days ⇒ Object Also known as: day
16 17 18 |
# File 'lib/workbox/time.rb', line 16 def days hours*24 end |
#hours ⇒ Object Also known as: hour
11 12 13 |
# File 'lib/workbox/time.rb', line 11 def hours minutes*60 end |
#minutes ⇒ Object Also known as: minute
6 7 8 |
# File 'lib/workbox/time.rb', line 6 def minutes to_i * 60 end |