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