Sha256: ba32088cb96a7ebd6f13345e2beabe2c87f6e0e65e3e18292465ffc7ca29b921
Contents?: true
Size: 435 Bytes
Versions: 11
Compression:
Stored size: 435 Bytes
Contents
class Browser module Language LANGUAGES = YAML.load_file(File.expand_path("../../../../languages.yml", __FILE__)) # Set browser's preferred language attr_writer :accept_language # Return an array with all preferred languages that this browser accepts. def accept_language @accept_language .gsub(/;q=[\d.]+/, "") .split(",") .map {|l| l.downcase.gsub(/\s/m, "") } end end end
Version data entries
11 entries across 11 versions & 1 rubygems