lib/influxer/metrics/relation/time_query.rb in influxer-0.5.0 vs lib/influxer/metrics/relation/time_query.rb in influxer-0.5.1

- old
+ new

@@ -22,14 +22,14 @@ # # select * from metrics group by time(1h) # # Metrics.time("4d", fill: 0) # # select * from metrics group by time(4d) fill(0) def time(val, options = {}) - if val.is_a?(Symbol) - @values[:time] = TIME_ALIASES[val] || '1' + val.to_s - else - @values[:time] = val - end + @values[:time] = if val.is_a?(Symbol) + TIME_ALIASES[val] || '1' + val.to_s + else + val + end build_fill(options[:fill]) self end