Class: Browser::Device::Android
- Inherits:
-
Base
- Object
- Base
- Browser::Device::Android
show all
- Defined in:
- lib/browser/device/android.rb
Instance Attribute Summary
Attributes inherited from Base
#ua
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#id ⇒ Object
6
7
8
|
# File 'lib/browser/device/android.rb', line 6
def id
:unknown
end
|
#match? ⇒ Boolean
15
16
17
|
# File 'lib/browser/device/android.rb', line 15
def match?
ua.include?("Android")
end
|
#name ⇒ Object
10
11
12
13
|
# File 'lib/browser/device/android.rb', line 10
def name
ua[/\(Linux.*?; Android.*?; ([-_a-z0-9 ]+) Build[^)]+\)/i, 1] ||
"Unknown"
end
|