Method: Bright::Connection#initialize
- Defined in:
- lib/bright/connection.rb
#initialize(endpoint) ⇒ Connection
Returns a new instance of Connection.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/bright/connection.rb', line 25 def initialize(endpoint) @endpoint = endpoint.is_a?(URI) ? endpoint : URI.parse(endpoint) @open_timeout = OPEN_TIMEOUT @read_timeout = READ_TIMEOUT @verify_peer = VERIFY_PEER @ignore_http_status = false @ssl_version = nil @proxy_address = nil @proxy_port = nil if Bright.devmode && !@logger @logger = Logger.new(STDOUT) @logger.level = Logger::INFO end end |