Module: Rack::UserAgent::Checker

Includes:
Result
Included in:
Request, Detector
Defined in:
lib/rack/user_agent/checker.rb

Constant Summary

Constants included from Result

Result::UNKNOWN_VARIANT

Instance Method Summary collapse

Methods included from Result

#browser, #browser_vendor, #browser_version, #device_type, #device_variant, #os, #os_version

Instance Method Details

#from_appliance?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/rack/user_agent/checker.rb', line 20

def from_appliance?
  device_type == :appliance
end

#from_crawler?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/rack/user_agent/checker.rb', line 24

def from_crawler?
  device_type == :crawler
end

#from_mobilephone?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/rack/user_agent/checker.rb', line 16

def from_mobilephone?
  device_type == :mobilephone
end

#from_pc?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/rack/user_agent/checker.rb', line 8

def from_pc?
  device_type == :pc
end

#from_smartphone?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/rack/user_agent/checker.rb', line 12

def from_smartphone?
  device_type == :smartphone
end