Method: Polars::Config.state
- Defined in:
- lib/polars/config.rb
.state(if_set: false, env_only: false) ⇒ Object
Show the current state of all Config variables as a dict.
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/polars/config.rb', line 94 def self.state(if_set: false, env_only: false) config_state = POLARS_CFG_ENV_VARS.sort .select { |var| !if_set || !ENV[var].nil? } .to_h { |var| [var, ENV[var]] } if !env_only POLARS_CFG_DIRECT_VARS.each do |cfg_methodname, get_value| config_state[cfg_methodname] = get_value.call end end config_state end |