I have a config YAML file with the following array:
EMAILS: ['[email protected]', '[email protected]', '[email protected]']
And then I want to search inside this YAML array for a particular string, say "[email protected]".
I use the following ruby code:
if CONFIG[:EMAILS].include?("[email protected]")
return true
else
return false
end
However, this always returns false.
I can PUTS the CONFIG[:EMAIL] array fine.
Can anyone suggest what I'm doing wrong.
CONFIG[:EMAILS]please? and how you parse the yaml file?