Class: Kontena::Cli::Stacks::YAML::LiquidNull

Inherits:
Object
  • Object
show all
Defined in:
lib/kontena/cli/stacks/yaml/reader.rb

Overview

Workaround for nil-valued variables in Liquid templates:

https://github.com/Shopify/liquid/issues/749

This is something that we can pass in to Liquid::Template.render that gets evaluated as nil. If we pass in a nil value directly, then Liquid ignores it and considers the variable to be undefined.

Instance Method Summary collapse

Instance Method Details

#to_liquid ⇒ Object



16
17
18
# File 'lib/kontena/cli/stacks/yaml/reader.rb', line 16

def to_liquid
  nil
end