Method: HTTP::URI#initialize
- Defined in:
- lib/http/uri.rb
#initialize(options_or_uri = {}) ⇒ HTTP::URI
Creates an HTTP::URI instance from the given options
64 65 66 67 68 69 70 71 72 73 |
# File 'lib/http/uri.rb', line 64 def initialize( = {}) case when Hash @uri = Addressable::URI.new() when Addressable::URI @uri = else raise TypeError, "expected Hash for options, got #{.class}" end end |