diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/http.rb | 31 | ||||
-rw-r--r-- | lib/net/http/response.rb | 22 |
2 files changed, 2 insertions, 51 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 7fd6f9d1b3..f07586e656 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -98,36 +98,7 @@ module Net #:nodoc: # # == About the Examples # - # Examples here assume that <tt>net/http</tt> has been required - # (which also requires +uri+): - # - # require 'net/http' - # - # Many code examples here use these example websites: - # - # - https://jsonplaceholder.typicode.com. - # - http://example.com. - # - # Some examples also assume these variables: - # - # uri = URI('https://jsonplaceholder.typicode.com') - # uri.freeze # Examples may not modify. - # hostname = uri.hostname # => "jsonplaceholder.typicode.com" - # port = uri.port # => 443 - # - # So that example requests may be written as: - # - # Net::HTTP.get(uri) - # Net::HTTP.get(hostname, '/index.html') - # Net::HTTP.start(hostname) do |http| - # http.get('/todos/1') - # http.get('/todos/2') - # end - # - # An example that needs a modified URI first duplicates +uri+, then modifies: - # - # _uri = uri.dup - # _uri.path = '/todos/1' + # :include: doc/net-http/examples.rdoc # # == URIs # diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb index 567b9573fa..83853ffd19 100644 --- a/lib/net/http/response.rb +++ b/lib/net/http/response.rb @@ -4,27 +4,7 @@ # # == About the Examples # -# Examples here assume that <tt>net/http</tt> has been required -# (which also requires +uri+): -# -# require 'net/http' -# -# Many code examples here use these example websites: -# -# - https://jsonplaceholder.typicode.com. -# - http://example.com. -# -# Some examples also assume these variables: -# -# uri = URI('https://jsonplaceholder.typicode.com') -# uri.freeze # Examples may not modify. -# hostname = uri.hostname # => "jsonplaceholder.typicode.com" -# port = uri.port # => 443 -# -# An example that needs a modified URI first duplicates +uri+, then modifies: -# -# _uri = uri.dup -# _uri.path = '/todos/1' +# :include: doc/net-http/examples.rdoc # # == Returned Responses # |