DEFAULT_URI_PARSER | = | URI::Parser.new(:HOSTNAME => /(?:#{URI::PATTERN::HOSTNAME})|/) | Make sure to allow empty hostnames, Ruby 2.0.0 does not. | |
Event | = | self | @private |
method | -> | type |
method | [RW] | @return [Symbol] method name that this event will call in {dispatch} |
Use Event.new(impl) to wrap a C event, or Event.new(nil, method, context) to create a pure-ruby event.
Convert s to a {URI::AMQP} or {URI::AMQPS} object
Shortcut strings like "host:port" are allowed: an "amqp://" prefix is added if s does not already look like an ‘amqp:’, ‘amqps:’ URI.
@note this does not give the same result as a standard URI parser in all cases.
For standard conversion to a URI use: {#URI}(s)
@param s [String,URI] String to convert to a URI, or a URI object.
A URI object with no scheme will be converted to {URI::AMQP}
@return [URI::AMQP] A valid {URI::AMQP} or {URI::AMQPS} object @raise [BadURIError] s is a URI object with a non-AMQP scheme @raise [InvalidURIError] s cannot be parsed as a URI or shortcut @raise [::ArgumentError] s is not a string or URI