Sha256: 056fc3385c13a381f38feb23025755030af5dc26e003087ff1a7629412294726
Contents?: true
Size: 520 Bytes
Versions: 12
Compression:
Stored size: 520 Bytes
Contents
class Condenser::Erubi def self.setup(environment) require "erubi" unless defined?(::Erubi::Engine) end def self.call(environment, data) source = ::Erubi::Engine.new(data[:source], { preamble: "@output_buffer = String.new;", bufvar: "@output_buffer", postamble: "@output_buffer.to_s" }).src source = eval("proc { #{source} }", nil, data[:filename] || "(erubi)") source = environment.new_context_class.instance_eval(&source) data[:source] = source end end
Version data entries
12 entries across 12 versions & 1 rubygems