Sha256: 34e02920e2a2fa9b73b825223b5f03523919ebe2cbe9cf8618ac7ddb566498d2
Contents?: true
Size: 469 Bytes
Versions: 8
Compression:
Stored size: 469 Bytes
Contents
module Rescpos class Report include ERB::Util include ReportUtil def render(opts = {}) template = opts[:file] ? File.read(opts[:file]) : opts[:template] unless template template_filename = self.class.to_s.gsub(/Report/, '').underscore template = File.read(File.join(Rescpos.configuration.template_path, "#{template_filename}.escpos.erb")) end erb = ERB.new(template, 0) erb.result(binding) end end end
Version data entries
8 entries across 8 versions & 1 rubygems