Sha256: a03aa20a109d500876eb4a3bb207d5b7e389d4b7ae0d5186a560b470e1354edb
Contents?: true
Size: 520 Bytes
Versions: 1
Compression:
Stored size: 520 Bytes
Contents
require 'gruff' module Reparty class Report attr_reader :title, :color def initialize(title) raise "Report: title must be defined" if title.blank? @title = title @color = "#832701" end def attach(attachments) # Optional end protected def build_daily_graph(start_date=DateTime.now.utc) g = Gruff::Line.new(545) g.title = @title g.labels = Hash[*(1..7).map{|x| [x-1, (start_date - (8-x)).strftime("%-m/%-d")] }.flatten] g end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reparty-0.3.1 | lib/reparty/report.rb |