kevinelliott / agent_orange

Parse and process User Agents like a secret one
126 stars 36 forks source link

Allow custom regex overrides for parser #33

Open kevinelliott opened 11 years ago

kevinelliott commented 11 years ago

Allow developers to inject their own regex matchers for specific needs. These injections should prepend all other parsing so that their additions are prioritized.

Something like this might be nice:

AgentOrange.custom_matchers << AgentOrange::Matcher.new(name: 'Special Bot', regex: /.+SpecialBot.+/)