Skip to content

Outputting Your Settings

jfelchner edited this page Oct 27, 2014 · 1 revision

Chamber makes it dead simple to output your environment settings in a variety of formats.

The simplest is:

Chamber.to_s
# => MY_SETTING="my value" MY_OTHER_SETTING="my other value"

But you can pass other options to customize the string:

  • pair_separator
  • value_surrounder
  • name_value_separator
Chamber.to_s pair_separator:        "\n",
             value_surrounder:      "'",
             name_value_separator:  ': '

# => MY_SETTING: 'my value'
# => MY_OTHER_SETTING: 'my other value'
Clone this wiki locally