Class: TimeRounder::RoundedTimeFromSeconds
- Inherits:
-
Object
- Object
- TimeRounder::RoundedTimeFromSeconds
- Includes:
- LoadSchedule
- Defined in:
- lib/time_rounder/rounded_time_from_seconds.rb
Overview
Takes seconds and returns a decimal of hours and partial hours.
Instance Attribute Summary collapse
-
#seconds ⇒ Object
Returns the value of attribute seconds.
Instance Method Summary collapse
-
#rounded_time ⇒ Object
Returns the total rounded hours in the number of seconds.
Methods included from LoadSchedule
Instance Attribute Details
#seconds ⇒ Object
Returns the value of attribute seconds.
9 10 11 |
# File 'lib/time_rounder/rounded_time_from_seconds.rb', line 9 def seconds @seconds end |
Instance Method Details
#rounded_time ⇒ Object
Returns the total rounded hours in the number of seconds
13 14 15 16 17 |
# File 'lib/time_rounder/rounded_time_from_seconds.rb', line 13 def rounded_time time = hours + quarter_hours time += 1 if add_hour? time end |