If I already have a hash, can I make it so that
h[:foo] h[\'foo\']
are the same? (is this called indifferent access?)
The details: I
You can also write the YAML file that way:
--- !map:HashWithIndifferentAccess one: 1 two: 2
after that:
SETTINGS = YAML.load_file("path/to/yaml_file") SETTINGS[:one] # => 1 SETTINGS['one'] # => 1