Class: Rasper::Compiler

Inherits:
Object
  • Object
show all
Extended by:
Locale
Defined in:
lib/rasper/compiler.rb

Class Method Summary collapse

Methods included from Locale

run_with_locale

Class Method Details

.compile(jrxml_file, output_dir = nil) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/rasper/compiler.rb', line 11

def self.compile(jrxml_file, output_dir = nil)
  run_with_locale do
    output_dir ||= File.dirname(jrxml_file)
    output_file = File.join(output_dir, File.basename(jrxml_file, '.jrxml') + '.jasper')
    JasperCompileManager.compile_report_to_file(jrxml_file, output_file)
  end
end