module MReport
Public Class Methods
load_reports(path)
click to toggle source
# File lib/bull/mreport.rb, line 8 def self.load_reports path @reports = {} #Dir.glob(File.join('..', '..', '**', 'reports' , '*.html')).each do |file| Dir.glob(File.join(path, '**', 'reports' , '*.html')).each do |file| puts "load file #{file}" html = File.read(file) @reports[File.basename(file, '.html')] = Liquid::Template.parse(html) end puts 'reports loaded' @reports end
reports()
click to toggle source
# File lib/bull/mreport.rb, line 20 def self.reports return @reports #if !@reports.nil? #load_reports end
Public Instance Methods
reports()
click to toggle source
# File lib/bull/mreport.rb, line 4 def reports MReport.reports end