Right now, config.redis.host = "redis.example" would raise a NoMethodError since config.redis hasn't been set. Harbor::Configuration should overwrite method_missing and register a new Harbor::Configuration instance for you if the entry isn't registered.
This would break cases where you wanted a nil, but would make the more common case of wanting to organize your configuration easier/simpler so the answer to that would be to just explicitly set nil or false if that's what you wanted.
Right now,
config.redis.host = "redis.example"
would raise aNoMethodError
sinceconfig.redis
hasn't been set.Harbor::Configuration
should overwritemethod_missing
and register a new Harbor::Configuration instance for you if the entry isn't registered.This would break cases where you wanted a
nil
, but would make the more common case of wanting to organize your configuration easier/simpler so the answer to that would be to just explicitly setnil
orfalse
if that's what you wanted.