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