Class: DeviceDetector::OS
Constant Summary
Constants inherited
from Parser
Parser::ROOT
Instance Attribute Summary
Attributes inherited from Parser
#user_agent
Instance Method Summary
collapse
Methods inherited from Parser
#initialize
Instance Method Details
#desktop? ⇒ Boolean
19
20
21
|
# File 'lib/device_detector/os.rb', line 19
def desktop?
DESKTOP_OSS.include?(family)
end
|
#family ⇒ Object
15
16
17
|
# File 'lib/device_detector/os.rb', line 15
def family
os_info[:family]
end
|
#full_version ⇒ Object
23
24
25
26
|
# File 'lib/device_detector/os.rb', line 23
def full_version
raw_version = super.to_s.split('_').join('.')
raw_version == '' ? nil : raw_version
end
|
#name ⇒ Object
7
8
9
|
# File 'lib/device_detector/os.rb', line 7
def name
os_info[:name]
end
|
#short_name ⇒ Object
11
12
13
|
# File 'lib/device_detector/os.rb', line 11
def short_name
os_info[:short]
end
|