Fix rubocop offenses

This commit is contained in:
Sebastian Serth
2021-10-05 12:09:56 +02:00
parent 2c0a9fda8d
commit 74e285e9fd
11 changed files with 16 additions and 14 deletions

View File

@ -5,7 +5,7 @@ module TimeHelper
def time_to_f(timestamp)
unless timestamp.nil?
timestamp = timestamp.split(':')
return timestamp[0].to_i * 60 * 60 + timestamp[1].to_i * 60 + timestamp[2].to_f
return (timestamp[0].to_i * 60 * 60) + (timestamp[1].to_i * 60) + timestamp[2].to_f
end
nil
end