Module: Kameleoon::BrowserType

Defined in:
lib/kameleoon/data/browser.rb

Constant Summary collapse

CHROME =
0
INTERNET_EXPLORER =
1
FIREFOX =
2
SAFARI =
3
OPERA =
4
OTHER =
5

Class Method Summary collapse

Class Method Details

.from_name(name) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/kameleoon/data/browser.rb', line 16

def self.from_name(name)
  case name
  when 'CHROME'
    BrowserType::CHROME
  when 'INTERNET_EXPLORER'
    BrowserType::INTERNET_EXPLORER
  when 'FIREFOX'
    BrowserType::FIREFOX
  when 'SAFARI'
    BrowserType::SAFARI
  when 'OPERA'
    BrowserType::OPERA
  when 'OTHER'
    BrowserType::OTHER
  else
    nil
  end
end