Class: Cliqr::Usage::TemplateRenderer Private
- Inherits:
-
Object
- Object
- Cliqr::Usage::TemplateRenderer
- Defined in:
- lib/cliqr/usage/usage_builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Renders a template file based on configuration settings
Class Method Summary collapse
-
.render(template_file_path, context) ⇒ Nothing
private
Render a partial script.
Class Method Details
.render(template_file_path, context) ⇒ Nothing
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Render a partial script
51 52 53 54 55 56 |
# File 'lib/cliqr/usage/usage_builder.rb', line 51 def self.render(template_file_path, context) template_file_path = File.(template_file_path, __FILE__) template = ERB.new(File.new(template_file_path).read, nil, '%') result = template.result(context.instance_eval { binding }) Cliqr::Util.trim_newlines(result) end |