Sha256: 2ddf0e5607e8225ccfc57efee68b3077ac01b7f16f592d58fe0bcdefea72f3a2

Contents?: true

Size: 673 Bytes

Versions: 22

Compression:

Stored size: 673 Bytes

Contents

module Fastlane
  class ErbTemplateHelper
    require "erb"
    def self.load(template_name)
      path = "#{Helper.gem_path('fastlane')}/lib/assets/#{template_name}.erb"
      load_from_path(path)
    end

    def self.load_from_path(template_filepath)
      unless File.exist?(template_filepath)
        UI.user_error!("Could not find Template at path '#{template_filepath}'")
      end
      File.read(template_filepath)
    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

22 entries across 22 versions & 1 rubygems

Version Path
fastlane-1.94.0 lib/fastlane/erb_template_helper.rb
fastlane-1.93.1 lib/fastlane/erb_template_helper.rb
fastlane-1.93.0 lib/fastlane/erb_template_helper.rb
fastlane-1.92.0 lib/fastlane/erb_template_helper.rb
fastlane-1.92.0.beta2 lib/fastlane/erb_template_helper.rb
fastlane-1.92.0.beta1 lib/fastlane/erb_template_helper.rb
fastlane-1.91.0 lib/fastlane/erb_template_helper.rb
fastlane-1.90.0 lib/fastlane/erb_template_helper.rb
fastlane-1.89.0 lib/fastlane/erb_template_helper.rb
fastlane-1.88.0 lib/fastlane/erb_template_helper.rb
fastlane-1.87.1 lib/fastlane/erb_template_helper.rb
fastlane-1.87.0 lib/fastlane/erb_template_helper.rb
fastlane-1.86.1 lib/fastlane/erb_template_helper.rb
fastlane-1.86.0 lib/fastlane/erb_template_helper.rb
fastlane-1.85.0 lib/fastlane/erb_template_helper.rb
fastlane-1.84.0 lib/fastlane/erb_template_helper.rb
fastlane-1.83.0 lib/fastlane/erb_template_helper.rb
fastlane-1.82.0 lib/fastlane/erb_template_helper.rb
fastlane-1.81.0 lib/fastlane/erb_template_helper.rb
fastlane-1.80.0 lib/fastlane/erb_template_helper.rb