Class: GnuplotRenderer
- Inherits:
-
Object
- Object
- GnuplotRenderer
- Defined in:
- lib/gitstats/renderer/gnuplot.rb
Defined Under Namespace
Classes: PlotHelper
Instance Method Summary collapse
- #handle?(file) ⇒ Boolean
-
#initialize(templatedir, outdir, verbose) ⇒ GnuplotRenderer
constructor
A new instance of GnuplotRenderer.
- #name ⇒ Object
- #render(file, stats) ⇒ Object
Constructor Details
#initialize(templatedir, outdir, verbose) ⇒ GnuplotRenderer
Returns a new instance of GnuplotRenderer.
127 128 129 130 131 |
# File 'lib/gitstats/renderer/gnuplot.rb', line 127 def initialize(templatedir, outdir, verbose) @templatedir = templatedir @outdir = outdir @verbose = verbose end |
Instance Method Details
#handle?(file) ⇒ Boolean
137 138 139 |
# File 'lib/gitstats/renderer/gnuplot.rb', line 137 def handle?(file) file =~ /\.plot$/ end |
#name ⇒ Object
133 134 135 |
# File 'lib/gitstats/renderer/gnuplot.rb', line 133 def name 'gnuplot' end |
#render(file, stats) ⇒ Object
141 142 143 144 145 146 147 |
# File 'lib/gitstats/renderer/gnuplot.rb', line 141 def render(file, stats) ifile = File.join(@templatedir, file) lines = IO::readlines(ifile).join('') PlotHelper.new(@templatedir, file, @outdir, stats, @verbose).run(lines) end |