Module: Qonfig::Commands::Definition::LoadFromENV::ValueConverter Private

Defined in:
lib/qonfig/commands/definition/load_from_env/value_converter.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

rubocop:disable Performance/MethodObjectAsBlock

Since:

  • 0.2.0

Constant Summary collapse

INTEGER_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.2.0

/\A\d+\z/.freeze
FLOAT_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.2.0

/\A\d+\.\d+\z/.freeze
TRUE_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.2.0

/\A(t|true)\z/i.freeze
FALSE_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.2.0

/\A(f|false)\z/i.freeze
ARRAY_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.2.0

/\A[^'"].*\s*,\s*.*[^'"]\z/.freeze
QUOTED_STRING_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.2.0

/\A['"].*['"]\z/.freeze

Class Method Summary collapse

Class Method Details

.convert_values!(env_data) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • env_data (Hash)

Since:

  • 0.2.0



49
50
51
52
53
# File 'lib/qonfig/commands/definition/load_from_env/value_converter.rb', line 49

def convert_values!(env_data)
  env_data.each_pair do |key, value|
    env_data[key] = convert_value(value)
  end
end