Module: AcceptLanguage

Defined in:
lib/accept_language.rb,
lib/accept_language/parser.rb,
lib/accept_language/intersection.rb

Overview

Tiny library for parsing the Accept-Language header.

Defined Under Namespace

Classes: Intersection, Parser

Class Method Summary collapse

Class Method Details

.intersection(raw_input, *supported_languages, truncate: true) ⇒ Object



5
6
7
# File 'lib/accept_language.rb', line 5

def self.intersection(raw_input, *supported_languages, truncate: true)
  Intersection.new(raw_input, *supported_languages, truncate: truncate).call
end

.parse(raw_input) ⇒ Object



9
10
11
# File 'lib/accept_language.rb', line 9

def self.parse(raw_input)
  Parser.new(raw_input).call
end