Method: Polars::Config.save
- Defined in:
- lib/polars/config.rb
.save ⇒ Config
Save the current set of Config options as a json string or file.
76 77 78 79 80 81 |
# File 'lib/polars/config.rb', line 76 def self.save environment_vars = POLARS_CFG_ENV_VARS.sort.select { |k| ENV.key?(k) }.to_h { |k| [k, ENV[k]] } direct_vars = POLARS_CFG_DIRECT_VARS.to_h { |cfg_methodname, get_value| [cfg_methodname, get_value.call] } = JSON.generate({environment: environment_vars, direct: direct_vars}) end |