Sha256: 2c5cfb6d32d70f13fed667e16c519075a38b48c0a489da92e3fa72e041e853e9

Contents?: true

Size: 482 Bytes

Versions: 7

Compression:

Stored size: 482 Bytes

Contents

UserAgent
=========

UserAgent is a Ruby library that parses and compares HTTP User Agents.


Example
=======

  Browser = Struct.new(:browser, :version)
  SupportedBrowsers = [
    Browser.new("Safari", "3.1.1"),
    Browser.new("Firefox", "2.0.0.14"),
    Browser.new("Internet Explorer", "7.0")
  ]

  user_agent = UserAgent.parse(request.user_agent)
  SupportedBrowsers.detect { |browser| user_agent >= browser }


Copyright (c) 2008 Joshua Peek, released under the MIT license

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
delano-useragent-0.0.2 README
josh-useragent-0.0.2 README
stella-0.5.4 vendor/useragent/README
stella-0.5.3 vendor/useragent/README
stella-0.5.1 vendor/useragent/README
stella-0.5.5 vendor/useragent/README
stella-0.3.2 vendor/useragent/README