Module: Rack::SimpleUserAgent::Detectors

Includes:
Android, Bot, Ios, WindowsPhone
Included in:
Request
Defined in:
lib/rack/simple_user_agent/detectors.rb,
lib/rack/simple_user_agent/detectors/bot.rb,
lib/rack/simple_user_agent/detectors/ios.rb,
lib/rack/simple_user_agent/detectors/android.rb,
lib/rack/simple_user_agent/detectors/windows_phone.rb

Defined Under Namespace

Modules: Android, Bot, Ios, WindowsPhone

Instance Method Summary collapse

Methods included from WindowsPhone

#from_windows_phone?

Methods included from Ios

#from_ios?, #from_ipad?, #from_iphone?, #from_ipod?

Methods included from Bot

#from_googlebot?, #from_googlebot_images?, #from_googlebot_news?, #from_googlebot_video?

Methods included from Android

#from_android?, #from_android_mobile?, #from_android_tablet?

Instance Method Details

#from_smartdevice?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/rack/simple_user_agent/detectors.rb', line 16

def from_smartdevice?
  from_ios? || from_android? || from_windows_phone?
end

#from_smartphone?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/rack/simple_user_agent/detectors.rb', line 20

def from_smartphone?
  from_iphone? || from_ipod? || from_android_mobile? || from_windows_phone?
end

#from_tablet?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/rack/simple_user_agent/detectors.rb', line 24

def from_tablet?
  from_ipad? || from_android_tablet?
end