Module: Browser::Mobile
- Included in:
- Browser
- Defined in:
- lib/browser/methods/mobile.rb
Instance Method Summary collapse
-
#adobe_air? ⇒ Boolean
Detect if browser is Adobe AIR.
-
#blackberry? ⇒ Boolean
Detect if browser is BlackBerry.
-
#mobile? ⇒ Boolean
Detect if browser is mobile.
-
#opera_mini? ⇒ Boolean
Detect if browser is Opera Mini.
Instance Method Details
#adobe_air? ⇒ Boolean
Detect if browser is Adobe AIR.
19 20 21 |
# File 'lib/browser/methods/mobile.rb', line 19 def adobe_air? !!(ua =~ /adobeair/i) end |
#blackberry? ⇒ Boolean
Detect if browser is BlackBerry
14 15 16 |
# File 'lib/browser/methods/mobile.rb', line 14 def blackberry? !!(ua =~ /(BlackBerry)/) end |
#mobile? ⇒ Boolean
Detect if browser is mobile.
4 5 6 |
# File 'lib/browser/methods/mobile.rb', line 4 def mobile? detect_mobile? && !tablet? end |
#opera_mini? ⇒ Boolean
Detect if browser is Opera Mini.
9 10 11 |
# File 'lib/browser/methods/mobile.rb', line 9 def opera_mini? !!(ua =~ /Opera Mini/) end |