figaro
figaro copied to clipboard
Get only the ENV variables listed in the application.yml
Greetings, this is a question and not an issue but it is there a way to get the ENV variables without using File.join, for example i am loading my application.yml in rails application.rb using this method
config.settings = File.join(Rails.root, 'config', 'application.yml')
i wonder if it is possible to avoid that and instead using something like this:
config.settings = ENV.keys.select { |key| key.to_s.start_with?('_FIGARO_') }
But I am not sure if it is a good idea to do that
Thanks for this awesome gem