Method: SimpleHttp::Connection#initialize
- Defined in:
- lib/simple_http/connection.rb
#initialize(url, options = {}) ⇒ Connection
Returns a new instance of Connection.
46 47 48 49 50 51 |
# File 'lib/simple_http/connection.rb', line 46 def initialize(url, ={}) @uri = Addressable::URI.parse(url) self.class..keys.each do |key| instance_variable_set(:"@#{key}", .fetch(key, self.class.[key])) end end |