Sha256: 380a63f94801d9f515cc548ae44dda5ad7be557997ee6563bcbce7fd1c57e65a
Contents?: true
Size: 467 Bytes
Versions: 10
Compression:
Stored size: 467 Bytes
Contents
require "erb" class Climine::Template def initialize name internal_file_path = self.class.file_path(name) @path = File.exist?(internal_file_path) ? internal_file_path : name.to_s end def exist? File.exist?(@path) end def build ERB.new(load, nil, "-") end private def load File.read(@path) end class << self def file_path name "#{File.expand_path(File.dirname(__FILE__))}/template/#{name}.erb" end end end
Version data entries
10 entries across 10 versions & 1 rubygems