Sha256: 12220891d9209616dcf21d5dd62e7d3b5dfb099b3af06eccec73d71c1c8a7b68

Contents?: true

Size: 255 Bytes

Versions: 13

Compression:

Stored size: 255 Bytes

Contents

module BootstrapEmail
  class Erb
    def self.template(path, locals_hash = {})
      namespace = OpenStruct.new(locals_hash)
      template_html = File.read(path)
      ERB.new(template_html).result(namespace.instance_eval { binding })
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bootstrap-email-1.1.4 lib/bootstrap-email/erb.rb
bootstrap-email-1.1.3 lib/bootstrap-email/erb.rb
bootstrap-email-1.1.2 lib/bootstrap-email/erb.rb
bootstrap-email-1.1.1 lib/bootstrap-email/erb.rb
bootstrap-email-1.1.0 lib/bootstrap-email/erb.rb
bootstrap-email-1.0.2 lib/bootstrap-email/erb.rb
bootstrap-email-1.0.1 lib/bootstrap-email/erb.rb
bootstrap-email-1.0.0 lib/bootstrap-email/erb.rb
bootstrap-email-1.0.0.alpha4 lib/bootstrap-email/erb.rb
bootstrap-email-1.0.0.alpha3.1 lib/bootstrap-email/erb.rb
bootstrap-email-1.0.0.alpha3 lib/bootstrap-email/erb.rb
bootstrap-email-1.0.0.alpha2.1 lib/bootstrap-email/erb.rb
bootstrap-email-1.0.0.alpha2 lib/bootstrap-email/erb.rb