module Aua::Agents::Safari
Constants
- BUILDS
Public Class Methods
extend?(agent)
click to toggle source
# File lib/aua/agents/safari.rb, line 2 def self.extend?(agent) agent.products[-1] == "Safari" || agent.products[0] == "Safari" || (agent.products == ["Mozilla", "AppleWebKit", "Mobile"] && Aua::OperatingSystems::IOS::PLATFORMS.include?(agent.platform_string)) || agent.products.include?("OmniWeb") || agent.products[0] == "MobileSafari" end
Public Instance Methods
name()
click to toggle source
# File lib/aua/agents/safari.rb, line 46 def name @name ||= begin return :MobileSafari if products.include?("Mobile") || products[0] == "MobileSafari" return :Fluid if products.include?("Fluid") || products.include?("FluidApp") return :OmniWeb if products.include?("OmniWeb") :Safari end end
type()
click to toggle source
# File lib/aua/agents/safari.rb, line 42 def type :Browser end
version()
click to toggle source
# File lib/aua/agents/safari.rb, line 55 def version @version ||= begin case name when :OmniWeb version_of(name) else (name == :Fluid && version_of(:Fluid)) || version_of("Version") || BUILDS[version_of("Safari")] || version_of("Mobile") || version_of("MobileSafari") || version_of("Safari") end end end