Class: AcceptLanguage::Parser
- Inherits:
-
Object
- Object
- AcceptLanguage::Parser
- Defined in:
- lib/accept_language/parser.rb
Overview
Note:
Parser for Accept-Language header fields.
Instance Attribute Summary collapse
-
#languages_range ⇒ Object
readonly
Returns the value of attribute languages_range.
Instance Method Summary collapse
-
#initialize(field) ⇒ Parser
constructor
A new instance of Parser.
-
#match(*available_langtags) ⇒ String, ...
The language that best matches.
Constructor Details
#initialize(field) ⇒ Parser
Returns a new instance of Parser.
13 14 15 |
# File 'lib/accept_language/parser.rb', line 13 def initialize(field) @languages_range = import(field) end |
Instance Attribute Details
#languages_range ⇒ Object (readonly)
Returns the value of attribute languages_range.
9 10 11 |
# File 'lib/accept_language/parser.rb', line 9 def languages_range @languages_range end |