From d2b87456f0e0046630dea9dd7fae4ec6324e9e92 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Wed, 14 Dec 2022 15:34:07 -0600 Subject: [ruby/net-http] [DOC] Correct formatting in header.rb (https://github.com/ruby/net-http/pull/90) https://github.com/ruby/net-http/commit/d9d829ca53 --- lib/net/http/header.rb | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'lib/net/http') diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index f267bea13f..40c119a353 100644 --- a/lib/net/http/header.rb +++ b/lib/net/http/header.rb @@ -301,7 +301,7 @@ module Net::HTTPHeader @header[stringified_downcased_key].dup end - # :call-seq + # call-seq: # fetch(key, default_val = nil) {|key| ... } -> object # fetch(key, default_val = nil) -> value or default_val # @@ -540,7 +540,7 @@ module Net::HTTPHeader result end - # :call-seq: + # call-seq: # set_range(length) -> length # set_range(offset, length) -> range # set_range(begin..length) -> range @@ -772,6 +772,7 @@ module Net::HTTPHeader # application/x-www-form-urlencoded # # Example: + # # http.form_data = {"q" => "ruby", "lang" => "en"} # http.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # http.set_form_data({"q" => "ruby", "lang" => "en"}, ';') @@ -801,12 +802,14 @@ module Net::HTTPHeader # # Each item of params should respond to +each+ and yield 2-3 arguments, # or an array of 2-3 elements. The arguments yielded should be: - # * The name of the field. - # * The value of the field, it should be a String or a File or IO-like. - # * An options hash, supporting the following options, only - # used for file uploads: - # :filename :: The name of the file to use. - # :content_type :: The content type of the uploaded file. + # + # - The name of the field. + # - The value of the field, it should be a String or a File or IO-like. + # - An options hash, supporting the following options + # (used only for file uploads); entries: + # + # - +:filename+: The name of the file to use. + # - +:content_type+: The content type of the uploaded file. # # Each item is a file field or a normal field. # If +value+ is a File object or the +opt+ hash has a :filename key, @@ -818,6 +821,7 @@ module Net::HTTPHeader # chunked encoding. # # Example: + # # req.set_form([["q", "ruby"], ["lang", "en"]]) # # req.set_form({"f"=>File.open('/path/to/filename')}, -- cgit v1.2.1