module Rack::UserAgent::Result

Constants

UNKNOWN_VARIANT

Public Instance Methods

browser() click to toggle source
# File lib/rack/user_agent/result.rb, line 23
def browser
  woothee_result[:name]
end
browser_vendor() click to toggle source
# File lib/rack/user_agent/result.rb, line 31
def browser_vendor
  woothee_result[:vendor]
end
browser_version() click to toggle source
# File lib/rack/user_agent/result.rb, line 27
def browser_version
  woothee_result[:version]
end
device_type() click to toggle source
# File lib/rack/user_agent/result.rb, line 6
def device_type
  woothee_result[:category]
end
device_variant() click to toggle source
# 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
os() click to toggle source
# File lib/rack/user_agent/result.rb, line 15
def os
  woothee_result[:os]
end
os_version() click to toggle source
# File lib/rack/user_agent/result.rb, line 19
def os_version
  woothee_result[:os_version]
end

Private Instance Methods

woothee_result() click to toggle source
# File lib/rack/user_agent/result.rb, line 37
def woothee_result
  env["rack.woothee"] || {}
end