Sha256: bdee59fb9b5d37274f5a9f535696f034d638774e32fe720f1bd0da981274f837

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

require 'user_agent/browsers/base'
require 'user_agent/browsers/chrome'
require 'user_agent/browsers/gecko'
require 'user_agent/browsers/internet_explorer'
require 'user_agent/browsers/opera'
require 'user_agent/browsers/webkit'

class UserAgent
  module Browsers
    Security = {
      "N" => :none,
      "U" => :strong,
      "I" => :weak
    }.freeze

    def self.all
      [InternetExplorer, Opera, Chrome, Webkit, Gecko]
    end

    def self.extend(array)
      all.each do |extension|
        return extension.new(array) if extension.extend?(array)
      end
      array
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
useragent-0.12.0 lib/user_agent/browsers.rb