mirror of
				https://gitea.invidious.io/iv-org/shard-athena-negotiation.git
				synced 2024-08-15 00:53:23 +00:00 
			
		
		
		
	Fix some typos in the docs (#5)
This commit is contained in:
		
							parent
							
								
									9e2579d622
								
							
						
					
					
						commit
						5fc45d1908
					
				
					 5 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
					@ -9,7 +9,7 @@ abstract class Athena::Negotiation::AbstractNegotiator(HeaderType)
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Returns the best `HeaderType` type based on the provided *header* value and *priorities*.
 | 
					  # Returns the best `HeaderType` based on the provided *header* value and *priorities*.
 | 
				
			||||||
  #
 | 
					  #
 | 
				
			||||||
  # If *strict* is `true`, an `ANG::Exceptions::Exception` will be raised if the *header* contains an invalid value, otherwise it is ignored.
 | 
					  # If *strict* is `true`, an `ANG::Exceptions::Exception` will be raised if the *header* contains an invalid value, otherwise it is ignored.
 | 
				
			||||||
  #
 | 
					  #
 | 
				
			||||||
| 
						 | 
					@ -41,7 +41,7 @@ abstract class Athena::Negotiation::AbstractNegotiator(HeaderType)
 | 
				
			||||||
    match.nil? ? nil : accepted_priorties[match.index]
 | 
					    match.nil? ? nil : accepted_priorties[match.index]
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Returns an array of `HeaderType` types that the provided *header* allows, ordered so that the `#best` match is first.
 | 
					  # Returns an array of `HeaderType` that the provided *header* allows, ordered so that the `#best` match is first.
 | 
				
			||||||
  #
 | 
					  #
 | 
				
			||||||
  # ```
 | 
					  # ```
 | 
				
			||||||
  # header = "text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, */*;q=0.5"
 | 
					  # header = "text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, */*;q=0.5"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,7 @@ require "./base_accept"
 | 
				
			||||||
# ```
 | 
					# ```
 | 
				
			||||||
# accept = ANG::Accept.new "application/json; q = 0.75; charset = UTF-8"
 | 
					# accept = ANG::Accept.new "application/json; q = 0.75; charset = UTF-8"
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# accept.header            # => "application/json; q = 0.9; charset = UTF-8"
 | 
					# accept.header            # => "application/json; q = 0.75; charset = UTF-8"
 | 
				
			||||||
# accept.normalized_header # => "application/json; charset=UTF-8"
 | 
					# accept.normalized_header # => "application/json; charset=UTF-8"
 | 
				
			||||||
# accept.parameters        # => {"charset" => "UTF-8"}
 | 
					# accept.parameters        # => {"charset" => "UTF-8"}
 | 
				
			||||||
# accept.quality           # => 0.75
 | 
					# accept.quality           # => 0.75
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,8 +5,8 @@ require "./base_accept"
 | 
				
			||||||
# ```
 | 
					# ```
 | 
				
			||||||
# accept = ANG::AcceptEncoding.new "gzip; q = 0.5; key=value"
 | 
					# accept = ANG::AcceptEncoding.new "gzip; q = 0.5; key=value"
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# accept.header            # => "gzip-1; q = 0.5; key=value"
 | 
					# accept.header            # => "gzip; q = 0.5; key=value"
 | 
				
			||||||
# accept.normalized_header # => "gzip-1; key=value"
 | 
					# accept.normalized_header # => "gzip; key=value"
 | 
				
			||||||
# accept.parameters        # => {"key" => "value"}
 | 
					# accept.parameters        # => {"key" => "value"}
 | 
				
			||||||
# accept.quality           # => 0.5
 | 
					# accept.quality           # => 0.5
 | 
				
			||||||
# accept.coding            # => "gzip"
 | 
					# accept.coding            # => "gzip"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,11 +19,11 @@ struct Athena::Negotiation::AcceptLanguage < Athena::Negotiation::BaseAccept
 | 
				
			||||||
  getter language : String
 | 
					  getter language : String
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Returns the region, if any, for this `AcceptLanguage` header.
 | 
					  # Returns the region, if any, for this `AcceptLanguage` header.
 | 
				
			||||||
  # E.x. if the `#language_range` is `zh-Hans-CN`, the language would be `cn`
 | 
					  # E.x. if the `#language_range` is `zh-Hans-CN`, the region would be `cn`
 | 
				
			||||||
  getter region : String? = nil
 | 
					  getter region : String? = nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Returns the script, if any, for this `AcceptLanguage` header.
 | 
					  # Returns the script, if any, for this `AcceptLanguage` header.
 | 
				
			||||||
  # E.x. if the `#language_range` is `zh-Hans-CN`, the language would be `hans`
 | 
					  # E.x. if the `#language_range` is `zh-Hans-CN`, the script would be `hans`
 | 
				
			||||||
  getter script : String? = nil
 | 
					  getter script : String? = nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def initialize(value : String)
 | 
					  def initialize(value : String)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
# Base type for properties/logic all [Accept*](https://tools.ietf.org/html/rfc7231#section-5.3) headers share.
 | 
					# Base type for properties/logic all [Accept*](https://tools.ietf.org/html/rfc7231#section-5.3) headers share.
 | 
				
			||||||
abstract struct Athena::Negotiation::BaseAccept
 | 
					abstract struct Athena::Negotiation::BaseAccept
 | 
				
			||||||
  # Returns the full unaltered header `self` represents.
 | 
					  # Returns the full unaltered header `self` represents.
 | 
				
			||||||
  # E.x. `text/html` or `unicode-1-1;q=0.8` or `zh-Hans-CN`.
 | 
					  # E.x. `text/html`, `unicode-1-1;q=0.8`, or `zh-Hans-CN`.
 | 
				
			||||||
  getter header : String
 | 
					  getter header : String
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Returns a normalized version of the `#header`, excluding the `#quality` parameter.
 | 
					  # Returns a normalized version of the `#header`, excluding the `#quality` parameter.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue