Sha256: 0e2eef1989a2e0fd286067849cee69b861bfe2129864bc504262a197d84bb306

Contents?: true

Size: 425 Bytes

Versions: 1

Compression:

Stored size: 425 Bytes

Contents

# frozen_string_literal: true

require "erb"
require "dassets/engine"
require "dassets-erb/version"

module Dassets::Erb; end
class Dassets::Erb::Engine < Dassets::Engine
  def self.ERB_EXTENSIONS
    ["erb", "erubis", "erubi"]
  end

  def ext(input_ext)
    return "" if self.class.ERB_EXTENSIONS.include?(input_ext)

    input_ext
  end

  def compile(input_content)
    ::ERB.new(input_content).result(binding)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dassets-erb-0.3.0 lib/dassets-erb.rb