Method: Gem::Net::HTTP#use_ssl=

Defined in:
lib/rubygems/vendor/net-http/lib/net/http.rb

#use_ssl=(flag) ⇒ Object

Sets whether a new session is to use Transport Layer Security:

Raises IOError if attempting to change during a session.

Raises OpenSSL::SSL::SSLError if the port is not an HTTPS port.



1512
1513
1514
1515
1516
1517
1518
# File 'lib/rubygems/vendor/net-http/lib/net/http.rb', line 1512

def use_ssl=(flag)
  flag = flag ? true : false
  if started? and @use_ssl != flag
    raise IOError, "use_ssl value changed, but session already started"
  end
  @use_ssl = flag
end