Sha256: a88788c2c7adbfd4c386f91dd724698f6e5790028a75b24dadd6a249b412dd27

Contents?: true

Size: 795 Bytes

Versions: 6

Compression:

Stored size: 795 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].match(/^MSIE/)
      end

      def browser
        "Internet Explorer"
      end
      
      def version=(v)
        application.comment[1] = "MSIE #{v}"
      end
      
      def version
        application.comment[1].sub("MSIE ", "")
      end

      def compatibility
        application.comment[0]
      end

      def compatible?
        compatibility == "compatible"
      end

      def platform
        "Windows"
      end

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

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
delano-useragent-0.0.2 lib/user_agent/browsers/internet_explorer.rb
stella-0.3.2 vendor/useragent/lib/user_agent/browsers/internet_explorer.rb
stella-0.5.3 vendor/useragent/lib/user_agent/browsers/internet_explorer.rb
stella-0.5.5 vendor/useragent/lib/user_agent/browsers/internet_explorer.rb
stella-0.5.4 vendor/useragent/lib/user_agent/browsers/internet_explorer.rb
stella-0.5.1 vendor/useragent/lib/user_agent/browsers/internet_explorer.rb