Sha256: aef0a7a66b2fb61a78f22b8ab9405fa47ec084ab8d354e95dbf7f0cd7d089207

Contents?: true

Size: 979 Bytes

Versions: 5

Compression:

Stored size: 979 Bytes

Contents

class UserAgent
  module Browsers
    module InternetExplorer
      def self.extend?(agent)
        agent.application &&
          agent.application.comment &&
          agent.application.comment[0] == "compatible" &&
          agent.application.comment[1] =~ /MSIE/
      end

      def browser
        "Internet Explorer"
      end

      def version
        application.comment[1].sub("MSIE ", "")
      end

      def compatibility
        application.comment[0]
      end

      def compatible?
        compatibility == "compatible"
      end

      # Before version 4.0, Chrome Frame declared itself (unversioned) in a comment;
      # as of 4.0 it declares itself as a separate product with a version.

      def chromeframe
        application.comment.include?("chromeframe") || detect_product("chromeframe")
      end

      def platform
        "Windows"
      end

      def os
        OperatingSystems.normalize_os(application.comment[2])
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
useragent-0.3.1 lib/user_agent/browsers/internet_explorer.rb
useragent-0.3.0 lib/user_agent/browsers/internet_explorer.rb
useragent-0.2.3 lib/user_agent/browsers/internet_explorer.rb
useragent-0.2.2 lib/user_agent/browsers/internet_explorer.rb
useragent-0.2.1 lib/user_agent/browsers/internet_explorer.rb