Class: Rack::Ketai::Carrier::Android
Constant Summary
collapse
- USER_AGENT_REGEXP =
/Android/
Constants inherited
from Smartphone
Smartphone::CIDRS
Instance Method Summary
collapse
Methods inherited from Smartphone
#mobile?
Methods inherited from General
filters
Methods inherited from Abstract
#cache_size, #deviceid, #display, #featurephone?, #filtering, filters, #filters, #ident, #initialize, #mobile?, #name, #position, #request, #subscriberid, valid_addr?, #valid_addr?, valid_ip?
Instance Method Details
#smartphone? ⇒ Boolean
14
15
16
|
# File 'lib/rack/ketai/carrier/android.rb', line 14
def smartphone?
super && !tablet?
end
|
#supports_cookie? ⇒ Boolean
10
11
12
|
# File 'lib/rack/ketai/carrier/android.rb', line 10
def supports_cookie?
true
end
|
#tablet? ⇒ Boolean
18
19
20
21
|
# File 'lib/rack/ketai/carrier/android.rb', line 18
def tablet?
@env['HTTP_USER_AGENT'].to_s !~ /Mobile/ ||
@env['HTTP_USER_AGENT'].to_s =~ /SC-01C/
end
|