Class: Fastlane::ErbTemplateHelper
- Inherits:
-
Object
- Object
- Fastlane::ErbTemplateHelper
- Defined in:
- lib/fastlane/erb_template_helper.rb
Class Method Summary collapse
- .load(template_name) ⇒ Object
- .load_from_path(template_filepath) ⇒ Object
- .render(template, template_vars_hash) ⇒ Object
Class Method Details
.load(template_name) ⇒ Object
4 5 6 7 |
# File 'lib/fastlane/erb_template_helper.rb', line 4 def self.load(template_name) path = "#{Fastlane::ROOT}/lib/assets/#{template_name}.erb" load_from_path(path) end |
.load_from_path(template_filepath) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/fastlane/erb_template_helper.rb', line 9 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 |