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