class Google::Cloud::Config
def add_config! key, config = nil, &block
-
(Config)
- self for chaining
Parameters:
-
config
(Config
) -- A config object to attach here. If not provided, -
key
(String, Symbol
) -- The name of the subconfig
def add_config! key, config = nil, &block key = validate_new_key! key if config.nil? config = Config.create(&block) elsif block yield config end @values[key] = config @defaults[key] = config @validators[key] = SUBCONFIG self end