module Kontena::Cli::Stacks::Common::StackValuesToOption
Attributes
values[RW]
Public Class Methods
included(where)
click to toggle source
Include to add –values-to variable value dumping feature
# File lib/kontena/cli/stacks/common.rb, line 79 def self.included(where) where.option '--values-to', '[FILE]', 'Output variable values as YAML to file' end
Public Instance Methods
dump_variables()
click to toggle source
Writes a YAML
file from the values received from YAML::Reader
to a file defined through the –values-to option
# File lib/kontena/cli/stacks/common.rb, line 85 def dump_variables File.write(values_to, ::YAML.dump(reader.variable_values, without_defaults: true, without_vault: true)) end