Module: Reportier::Time
- Defined in:
- lib/reportier/time.rb
Instance Method Summary collapse
- #days(int) ⇒ Object
- #hours(int) ⇒ Object
- #minutes(int) ⇒ Object
- #months(int) ⇒ Object
- #seconds(int) ⇒ Object
- #weeks(int) ⇒ Object
- #years(int) ⇒ Object
Instance Method Details
#days(int) ⇒ Object
15 16 17 |
# File 'lib/reportier/time.rb', line 15 def days(int) hours(int) * 24 end |
#hours(int) ⇒ Object
11 12 13 |
# File 'lib/reportier/time.rb', line 11 def hours(int) minutes(int) * 60 end |
#minutes(int) ⇒ Object
7 8 9 |
# File 'lib/reportier/time.rb', line 7 def minutes(int) int * 60 end |
#months(int) ⇒ Object
23 24 25 |
# File 'lib/reportier/time.rb', line 23 def months(int) days(int) * 30 end |
#seconds(int) ⇒ Object
3 4 5 |
# File 'lib/reportier/time.rb', line 3 def seconds(int) int end |
#weeks(int) ⇒ Object
19 20 21 |
# File 'lib/reportier/time.rb', line 19 def weeks(int) days(int) * 7 end |
#years(int) ⇒ Object
27 28 29 |
# File 'lib/reportier/time.rb', line 27 def years(int) Integer(days(int) * 365.25) end |