Sha256: 0b9c7d7300c788dcad99e7f99561cbe7c8b3eccb20b42303e8b80120a10e0da4

Contents?: true

Size: 526 Bytes

Versions: 12

Compression:

Stored size: 526 Bytes

Contents

module Fastlane
  class ErbTemplateHelper
    require "erb"
    def self.load(template_name)
      path = "#{Helper.gem_path('fastlane')}/lib/assets/#{template_name}.erb"
      raise "Could not find Template at path '#{path}'".red unless File.exist?(path)
      File.read(path)
    end

    def self.render(template,template_vars_hash)
      Fastlane::ErbalT.new(template_vars_hash).render(template)
    end

  end
  class ErbalT < OpenStruct
    def render(template)
      ERB.new(template).result(binding)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fastlane-1.13.1 lib/fastlane/erb_template_helper.rb
fastlane-1.13.0 lib/fastlane/erb_template_helper.rb
fastlane-1.12.0 lib/fastlane/erb_template_helper.rb
fastlane-1.11.0 lib/fastlane/erb_template_helper.rb
fastlane-1.10.0 lib/fastlane/erb_template_helper.rb
fastlane-1.9.0 lib/fastlane/erb_template_helper.rb
fastlane-1.8.0 lib/fastlane/erb_template_helper.rb
fastlane-1.7.3 lib/fastlane/erb_template_helper.rb
fastlane-1.7.2 lib/fastlane/erb_template_helper.rb
fastlane-1.7.1 lib/fastlane/erb_template_helper.rb
fastlane-1.7.0 lib/fastlane/erb_template_helper.rb
fastlane-1.6.0 lib/fastlane/erb_template_helper.rb