Module: Woothee::Appliance
- Extended by:
- Util
- Defined in:
- lib/woothee/appliance.rb
Class Method Summary
collapse
Methods included from Util
update_category, update_map, update_os, update_version
Class Method Details
.challenge_digitaltv(ua, result) ⇒ Object
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/woothee/appliance.rb', line 37
def self.challenge_digitaltv(ua, result)
data = if ua.index('InettvBrowser/')
Woothee::DataSet.get('DigitalTV')
else
nil
end
return false unless data
update_map(result, data)
true
end
|
.challenge_nintendo(ua, result) ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/woothee/appliance.rb', line 23
def self.challenge_nintendo(ua, result)
data = case
when ua.index('Nintendo 3DS;') then Woothee::DataSet.get('Nintendo3DS')
when ua.index('Nintendo DSi;') then Woothee::DataSet.get('NintendoDSi')
when ua.index('Nintendo Wii;') then Woothee::DataSet.get('NintendoWii')
when ua.index('(Nintendo WiiU)') then Woothee::DataSet.get('NintendoWiiU')
else nil
end
return false unless data
update_map(result, data)
true
end
|
.challenge_playstation(ua, result) ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/woothee/appliance.rb', line 9
def self.challenge_playstation(ua, result)
data = case
when ua.index('PSP (PlayStation Portable);') then Woothee::DataSet.get('PSP')
when ua.index('PlayStation Vita') then Woothee::DataSet.get('PSVita')
when ua.index('PLAYSTATION 3 ') || ua.index('PLAYSTATION 3;') then Woothee::DataSet.get('PS3')
when ua.index('PlayStation 4 ') then Woothee::DataSet.get('PS4')
else nil
end
return false unless data
update_map(result, data)
true
end
|