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)


14
15
16
# File 'lib/rack/simple_user_agent/detectors.rb', line 14

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

#from_smartphone?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/rack/simple_user_agent/detectors.rb', line 18

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

#from_tablet?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/rack/simple_user_agent/detectors.rb', line 22

def from_tablet?
  from_ipad? || from_android_tablet?
end