@@ -1472,12 +1472,15 @@ def proxy_class?
1472
1472
attr_reader :proxy_pass
1473
1473
end
1474
1474
1475
- # True if requests for this connection will be proxied
1475
+ # Returns +true+ if a proxy server is defined, +false+ otherwise;
1476
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1476
1477
def proxy?
1477
1478
!!( @proxy_from_env ? proxy_uri : @proxy_address )
1478
1479
end
1479
1480
1480
- # True if the proxy for this connection is determined from the environment
1481
+ # Returns +true+ if the proxy server is defined in the environment,
1482
+ # +false+ otherwise;
1483
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1481
1484
def proxy_from_env?
1482
1485
@proxy_from_env
1483
1486
end
@@ -1491,7 +1494,8 @@ def proxy_uri # :nodoc:
1491
1494
@proxy_uri || nil
1492
1495
end
1493
1496
1494
- # The address of the proxy server, if one is configured.
1497
+ # Returns the address of the proxy server, if defined, +nil+ otherwise;
1498
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1495
1499
def proxy_address
1496
1500
if @proxy_from_env then
1497
1501
proxy_uri &.hostname
@@ -1500,7 +1504,8 @@ def proxy_address
1500
1504
end
1501
1505
end
1502
1506
1503
- # The port of the proxy server, if one is configured.
1507
+ # Returns the port number of the proxy server, if defined, +nil+ otherwise;
1508
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1504
1509
def proxy_port
1505
1510
if @proxy_from_env then
1506
1511
proxy_uri &.port
@@ -1509,7 +1514,8 @@ def proxy_port
1509
1514
end
1510
1515
end
1511
1516
1512
- # The username of the proxy server, if one is configured.
1517
+ # Returns the user name of the proxy server, if defined, +nil+ otherwise;
1518
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1513
1519
def proxy_user
1514
1520
if @proxy_from_env
1515
1521
user = proxy_uri &.user
@@ -1519,7 +1525,8 @@ def proxy_user
1519
1525
end
1520
1526
end
1521
1527
1522
- # The password of the proxy server, if one is configured.
1528
+ # Returns the password of the proxy server, if defined, +nil+ otherwise;
1529
+ # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server].
1523
1530
def proxy_pass
1524
1531
if @proxy_from_env
1525
1532
pass = proxy_uri &.password
0 commit comments