Module: MReport
- Included in:
- BullServerController
- Defined in:
- lib/bull/mreport.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.load_reports(path) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# 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 ⇒ Object
20 21 22 23 |
# File 'lib/bull/mreport.rb', line 20 def self.reports return @reports #if [email protected]? #load_reports end |