Sha256: b2d0aa38797e098eb08aaf19408628274b7ef9892fbcdea0cb2c2b74d64f3d19
Contents?: true
Size: 742 Bytes
Versions: 10
Compression:
Stored size: 742 Bytes
Contents
# frozen_string_literal: true require 'fileutils' require 'gruff' # This module include provides graph methods for generating graphs with Gruff module QaServer module GruffGraph private # common path for displaying and writing def graph_relative_path File.join('qa_server', 'charts') end # used for displaying in a view with <image> tag def graph_image_path File.join('/', graph_relative_path) end # used for writing out the file def graph_full_path(graph_filename) path = Rails.root.join('public', graph_relative_path) # path = Rails.root.join('app', 'assets', 'images', graph_relative_path) FileUtils.mkdir_p path File.join(path, graph_filename) end end end
Version data entries
10 entries across 10 versions & 1 rubygems