Class: Rack::Ketai::Carrier::IPhone
Constant Summary
collapse
- USER_AGENT_REGEXP =
/iPhone|iPod|iPad/
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/iphone.rb', line 14
def smartphone?
super && !tablet?
end
|
#supports_cookie? ⇒ Boolean
10
11
12
|
# File 'lib/rack/ketai/carrier/iphone.rb', line 10
def supports_cookie?
true
end
|
#tablet? ⇒ Boolean
18
19
20
|
# File 'lib/rack/ketai/carrier/iphone.rb', line 18
def tablet?
@env['HTTP_USER_AGENT'].to_s =~ /iPad/
end
|