module Rubyxls

Constants

VERSION

Public Class Methods

generate_default_report() click to toggle source
# File lib/rubyxls.rb, line 3
def self.generate_default_report
  Report.new
end
open(report) click to toggle source
# File lib/rubyxls.rb, line 16
def self.open(report)
  `open "#{report_tmp_file_path(report)}"`
end
write_report_to_tmp(report) click to toggle source
# File lib/rubyxls.rb, line 7
def self.write_report_to_tmp(report)
  file_path = report_tmp_file_path(report)
  FileUtils.mkdir_p(tmp_dir_path) unless File.directory?(tmp_dir_path)
  File.delete(file_path) if File.exist?(file_path)
  File.open(file_path, 'w') do |file|
    file << report.download!.read
  end
end

Private Class Methods

report_tmp_file_path(report) click to toggle source
# File lib/rubyxls.rb, line 26
def self.report_tmp_file_path(report)
  tmp_dir_path + "/#{report.file_name}.#{report.file_extension}"
end
tmp_dir_path() click to toggle source
# File lib/rubyxls.rb, line 22
def self.tmp_dir_path
  File.expand_path('../../tmp', __FILE__)
end