Encapsules the gruff pie graph
# File lib/bigbench/post_processor/graphs.rb, line 75 def initialize title, options = {} @graph = Gruff::Pie.new(options[:size] || DEFAULT[:size]) @graph.title = title @graph.theme = options[:theme] || DEFAULT[:theme] @folder = options[:folder] || DEFAULT[:folder] Dir.mkdir @folder unless File.directory?(@folder) end
# File lib/bigbench/post_processor/graphs.rb, line 84 def add title, percentage @graph.data(title, percentage) end
# File lib/bigbench/post_processor/graphs.rb, line 93 def open %xopen #{File.join(@folder, @file)}` end
# File lib/bigbench/post_processor/graphs.rb, line 88 def write file puts "Writing Graph to #{File.join(@folder, @file = file)}" @graph.write File.join(@folder, @file = file) end