Class: Browser::Device::Android

Inherits:
Base
  • Object
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

Constructor Details

This class inherits a constructor from Browser::Device::Base

Instance Method Details

#idObject



6
7
8
# File 'lib/browser/device/android.rb', line 6

def id
  :unknown
end

#match?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/browser/device/android.rb', line 15

def match?
  ua.include?("Android")
end

#nameObject



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