Module: SnippetCli::VarsBlockRenderer
- Defined in:
- lib/snippet_cli/vars_block_renderer.rb
Overview
Builds the vars: block as an array of YAML lines. indent: is prepended only to the vars: header; VarYamlRenderer owns var-entry indentation.
Class Method Summary collapse
Class Method Details
.render(vars, indent: '') ⇒ Object
9 10 11 12 13 |
# File 'lib/snippet_cli/vars_block_renderer.rb', line 9 def self.render(vars, indent: '') lines = ["#{indent}vars:"] vars.each { |var| lines.concat(VarYamlRenderer.var_lines(var)) } lines end |