Sha256: cbde9c4eb624aec5ba2dc12d5399bd13ec9add81968b3f8486031aeacc3e0e25
Contents?: true
Size: 416 Bytes
Versions: 1
Compression:
Stored size: 416 Bytes
Contents
# frozen_string_literal: true require 'erb' require 'tempfile' class ERB class FileOut < ERB def set_eoutvar(compiler, eoutvar = '_erbout') compiler.put_cmd = "#{eoutvar}.write" compiler.insert_cmd = "#{eoutvar}.write" compiler.pre_cmd = ["#{eoutvar} = Tempfile.create('_erbout', encoding: __ENCODING__)"] compiler.post_cmd = ["#{eoutvar}.close", "#{eoutvar}.path"] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
erb-file_out-0.1.2 | lib/erb/file_out.rb |