Sha256: 4c3148c04f883a3482bb8a5590768938217f22d425ae60d92e1daf78daf6bed8
Contents?: true
Size: 488 Bytes
Versions: 14
Compression:
Stored size: 488 Bytes
Contents
require 'erb' require 'review/extentions' module ReVIEW class Template include ERB::Util TEMPLATE_DIR = File.join(File.dirname(__FILE__), '../../templates') def self.load(filename, mode = 1) self.new(filename, mode) end def initialize(filename = nil, mode = nil) return unless filename content = File.read(filename) @erb = ERB.new(content, nil, mode) end def result(bind_data = nil) @erb.result(bind_data) end end end
Version data entries
14 entries across 14 versions & 1 rubygems