class Plot
@note This class plots file to pdf
Public Class Methods
call(path, hash)
click to toggle source
@note This method is plotting data to pdf.
# File lib/artemo/plot.rb, line 7 def self.call(path, hash) begin name = File.basename(path, '.txt') Prawn::Document.generate "#{name}.pdf" do data = {views: hash} chart data, legend: false, label: true, format: :percentage end puts "#{name}.pdf" rescue nil end end