fastlane/lib/fastlane/erb_template_helper.rb in fastlane-2.82.0.beta.20180217010002 vs fastlane/lib/fastlane/erb_template_helper.rb in fastlane-2.82.0.beta.20180218010003
- old
+ new
@@ -11,15 +11,20 @@
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)
+ def self.render(template, template_vars_hash, trim_mode = nil)
+ Fastlane::ErbalT.new(template_vars_hash, trim_mode).render(template)
end
end
class ErbalT < OpenStruct
+ def initialize(hash, trim_mode)
+ super(hash)
+ @trim_mode = trim_mode
+ end
+
def render(template)
- ERB.new(template).result(binding)
+ ERB.new(template, nil, @trim_mode).result(binding)
end
end
end