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

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

Instance Method Summary collapse

Instance Method Details

#to_liquidObject

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.



21
22
23
# File 'lib/kontena/cli/stacks/yaml/reader.rb', line 21

def to_liquid
  nil
end