Class: DeviceDetector::Client

Inherits:
Parser
  • Object
show all
Defined in:
lib/device_detector/client.rb

Constant Summary

Constants inherited from Parser

Parser::ROOT

Instance Attribute Summary

Attributes inherited from Parser

#user_agent

Instance Method Summary collapse

Methods inherited from Parser

#full_version, #initialize, #name

Constructor Details

This class inherits a constructor from DeviceDetector::Parser

Instance Method Details

#browser?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/device_detector/client.rb', line 9

def browser?
  regex_meta[:path] == :"client/browsers.yml"
end

#known?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/device_detector/client.rb', line 5

def known?
  regex_meta.any?
end

#mobile_only_browser?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/device_detector/client.rb', line 13

def mobile_only_browser?
  DeviceDetector::Browser.mobile_only_browser?(name)
end