toolmantim/user_agent_parser — pull request #4 by jnunemaker (2013-01-10 18:54:17+00:00)
Title: Remove class methods

In master, the parser class is responsible for reading a path from disk, parsing it from yaml to ruby, converting all of the patterns into actual ruby regexes, and then finally matching those regexes/patterns to return browser family/version, operating system family/version, and device.

In this branch, the parser is responsible only for matching patterns. I used a file pattern loader which handles the read file, yaml parse, regex conversion and responds to call. The parser then takes an instance of anything that responds to call and returns a hash of patterns/regexes.

* It removes the need for any class level methods.
* Each parser instance defaults to a file pattern loader with the vendored ua-parser regexes path.

I added examples for basic usage and custom pattern loader usage. Also updated all readme and such. Should be good to go.