class Haora::Renderer
Private Instance Methods
rendered_duration(hours)
click to toggle source
# File lib/haora/renderer.rb, line 13 def rendered_duration(hours) format('%5.2f', hours) end
rendered_timespan(start, stop)
click to toggle source
# File lib/haora/renderer.rb, line 5 def rendered_timespan(start, stop) start = start.to_s start.prepend(' ') if start.length < 5 stop = stop.nil? ? ' now ' : stop.to_s stop.prepend(' ') if stop.length < 5 format('%s - %s', start, stop) end