Sha256: 8bcc8b3d0b7fcf718325992742df85e38f044f71250ee58104c192a2d7862e3c

Contents?: true

Size: 236 Bytes

Versions: 13

Compression:

Stored size: 236 Bytes

Contents

# frozen_string_literal: true

require 'ehbrs/patches/object/template'
require 'erb'

class Module
  def erb_template(subpath, binding_obj)
    ::ERB.new(template.child(subpath).path.read)
         .result binding_obj.binding
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ehbrs-tools-0.27.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.26.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.25.1 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.25.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.24.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.23.1 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.23.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.22.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.21.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.20.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.19.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.18.0 lib/ehbrs/patches/module/erb_template.rb
ehbrs-tools-0.17.0 lib/ehbrs/patches/module/erb_template.rb