Class: Fastlane::ErbTemplateHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/erb_template_helper.rb

Class Method Summary collapse

Class Method Details

.load(template_name) ⇒ Object



4
5
6
7
8
# File 'lib/fastlane/erb_template_helper.rb', line 4

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

.render(template, template_vars_hash) ⇒ Object



10
11
12
# File 'lib/fastlane/erb_template_helper.rb', line 10

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