class Net::IMAP::Config
def self.[](config)
Config.global. Use Config.new for an unfrozen config.
Given a Hash, creates a new _frozen_ config which inherits from
version. See Config@Named+defaults.
Given a version name, returns the default configuration for the target
version. See Config@Versioned+defaults.
Given a version number, returns the default configuration for the target
Net::IMAP::Config[config] -> same config
Net::IMAP::Config[hash] -> new frozen config
Net::IMAP::Config[symbol] -> named config
Net::IMAP::Config[number] -> versioned config
:call-seq:
def self.[](config) if config.is_a?(Config) then config elsif config.nil? && global.nil? then nil elsif config.respond_to?(:to_hash) then new(global, **config).freeze else version_defaults[config] or case config when Numeric raise RangeError, "unknown config version: %p" % [config] when String, Symbol raise KeyError, "unknown config name: %p" % [config] else raise TypeError, "no implicit conversion of %s to %s" % [ config.class, Config ] end end end