lib/clamsy/tenjin.rb
## read template file and preprocess it
read template file and preprocess it
read template file and preprocess it
def read_template_file(filename, _context)
        return File.read(filename) if !@preprocess
        _context ||= {}
        _context = hook_context(_context) if _context.is_a?(Hash) || _context._engine.nil?
        _buf = _context._buf
        _context._buf = ""
        begin
          return Preprocessor.new(filename).render(_context)
        ensure
          _context._buf = _buf
        end
      end
def read_template_file ( filename , _context ) return File . read ( filename ) if ! @preprocess _context ||= { } _context = hook_context ( _context ) if _context . is_a? ( Hash ) || _context . _engine . nil? _buf = _context . _buf _context . _buf = "" begin return Preprocessor . new ( filename ) . render ( _context ) ensure _context . _buf = _buf end end
read template file and preprocess it
read template file and preprocess it
filename
_context