Sha256: 80d1f201d85de7436538232754f06d25765a438bf610af1694e4b299ff07abdb

Contents?: true

Size: 612 Bytes

Versions: 4

Compression:

Stored size: 612 Bytes

Contents

require 'user_agent/browsers/all'
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, Chrome, Webkit, Opera, Gecko]
    end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
useragent-0.8.3 lib/user_agent/browsers.rb
useragent-0.8.2 lib/user_agent/browsers.rb
useragent-0.8.1 lib/user_agent/browsers.rb
useragent-0.8.0 lib/user_agent/browsers.rb