Sha256: ab9486432a52773ca83089297bfe1005fb026af4d23ce6d5d2f4653a045acc1d

Contents?: true

Size: 426 Bytes

Versions: 1

Compression:

Stored size: 426 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.1 lib/dassets-erb.rb