Sha256: d9998e667d36583990ea7a77456236e4d2464367115357c7d0ae6da8e7844ce4
Contents?: true
Size: 421 Bytes
Versions: 4
Compression:
Stored size: 421 Bytes
Contents
module Timetrap module Formatters class Csv attr_reader :output def initialize entries @output = entries.inject("start,end,note\n") do |out, e| next(out) unless e.end out << %|"#{e.start.strftime(time_format)}","#{e.end.strftime(time_format)}","#{e.note}"\n| end end private def time_format "%Y-%m-%d %H:%M:%S" end end end end
Version data entries
4 entries across 4 versions & 2 rubygems