For the moment in my code I use something like

```ruby
module Env
  class EnvKeyError < StandardError; end
  def self.method_missing(method_name, *arguments, &block)
    if method_name.to_s =~ /\?\z/
      !! env_value(method_name) { false }
    else
      env_value(method_name) { raise EnvKeyError, method_name }
    end
  end
 
  def self.respond_to_missing?(method_name, include_private = false)
    env_value(method_name) { false }
  end
 
  def self.method_to_key(method_name)
    method_name.to_s.sub('?','').upcase
  end
 
  def self.env_value(method_name, &block)
    ENV.fetch(method_to_key(method_name), &block)
  end
end
```

And it works pretty well... (the respond_to_missing? can be a respond_to? if needed)