Class: Gitlab::SafeDeviceDetector
- Inherits:
-
DeviceDetector
- Object
- DeviceDetector
- Gitlab::SafeDeviceDetector
- Defined in:
- lib/gitlab/safe_device_detector.rb
Constant Summary collapse
- USER_AGENT_MAX_SIZE =
1024
Instance Method Summary collapse
-
#initialize(user_agent) ⇒ SafeDeviceDetector
constructor
A new instance of SafeDeviceDetector.
Constructor Details
#initialize(user_agent) ⇒ SafeDeviceDetector
Returns a new instance of SafeDeviceDetector.
9 10 11 12 |
# File 'lib/gitlab/safe_device_detector.rb', line 9 def initialize(user_agent) super(user_agent) @user_agent = user_agent && user_agent[0..USER_AGENT_MAX_SIZE] end |