Class: TimeRounder::RoundedTimeFromSeconds

Inherits:
Object
  • Object
show all
Defined in:
lib/time_rounder/rounded_time_from_seconds.rb

Instance Method Summary collapse

Instance Method Details

#rounded_timeObject

Returns the total rounded hours in the number of seconds



9
10
11
12
13
# File 'lib/time_rounder/rounded_time_from_seconds.rb', line 9

def rounded_time
  time = hours + quarter_hours
  time += 1 if add_hour?
  time
end