Sha256: e78b4d53a49b76aba15f540107ec0c22c626ef5147232c6e2640c3cda91ff1d9
Contents?: true
Size: 800 Bytes
Versions: 8
Compression:
Stored size: 800 Bytes
Contents
class UserAgent module Browsers module Gecko def self.extend?(agent) agent.application && agent.application.product == "Mozilla" end GeckoBrowsers = %w( Firefox Camino Iceweasel Seamonkey ).freeze def browser GeckoBrowsers.detect { |browser| respond_to?(browser) } || super end def version send(browser).version || super end def platform application.comment[0] end def security Security[application.comment[1]] || :strong end def os i = application.comment[1] == 'U' ? 2 : 1 OperatingSystems.normalize_os(application.comment[i]) end def localization application.comment[3] end end end end
Version data entries
8 entries across 8 versions & 1 rubygems