Module: Rack::UserAgent::Result

Included in:
Request, Checker
Defined in:
lib/rack/user_agent/result.rb

Constant Summary collapse

UNKNOWN_VARIANT =
:unknown

Instance Method Summary collapse

Instance Method Details

#browserObject



23
24
25
# File 'lib/rack/user_agent/result.rb', line 23

def browser
  woothee_result[:name]
end

#browser_vendorObject



31
32
33
# File 'lib/rack/user_agent/result.rb', line 31

def browser_vendor
  woothee_result[:vendor]
end

#browser_versionObject



27
28
29
# File 'lib/rack/user_agent/result.rb', line 27

def browser_version
  woothee_result[:version]
end

#device_typeObject



6
7
8
# File 'lib/rack/user_agent/result.rb', line 6

def device_type
  woothee_result[:category]
end

#device_variantObject



10
11
12
13
# File 'lib/rack/user_agent/result.rb', line 10

def device_variant
  return UNKNOWN_VARIANT if woothee_result[:category] == Woothee::VALUE_UNKNOWN
  device_type
end

#osObject



15
16
17
# File 'lib/rack/user_agent/result.rb', line 15

def os
  woothee_result[:os]
end

#os_versionObject



19
20
21
# File 'lib/rack/user_agent/result.rb', line 19

def os_version
  woothee_result[:os_version]
end