Sha256: c54a7bc8ad1db3932d8c55e4076d5a060faf551966ae2abe60e622187cd1af95

Contents?: true

Size: 873 Bytes

Versions: 3

Compression:

Stored size: 873 Bytes

Contents

require 'user_agent/browsers/base'
require 'user_agent/browsers/chrome'
require 'user_agent/browsers/edge'
require 'user_agent/browsers/gecko'
require 'user_agent/browsers/internet_explorer'
require 'user_agent/browsers/opera'
require 'user_agent/browsers/webkit'
require 'user_agent/browsers/windows_media_player'
require 'user_agent/browsers/itunes'
require 'user_agent/browsers/apple_core_media'
require 'user_agent/browsers/libavformat'

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

    def self.all
      [Edge, InternetExplorer, Opera, Chrome, ITunes, Webkit, Gecko, WindowsMediaPlayer, AppleCoreMedia, Libavformat]
    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

3 entries across 3 versions & 1 rubygems

Version Path
useragent-0.15.2 lib/user_agent/browsers.rb
useragent-0.15.1 lib/user_agent/browsers.rb
useragent-0.15.0 lib/user_agent/browsers.rb