lib/bad_browser/user_agent.rb
# Tries to match the user agent for the supplied browser via regex. The regex's are written so
# we at least can match the vendor. It's key this method returns a "trueish" value if any
# match is made (thus halting the OR chain in detect_user_agent)
Tries to match the user agent for the supplied browser via regex. The regex's are written so
we at least can match the vendor. It's key this method returns a "trueish" value if any
match is made (thus halting the OR chain in detect_user_agent)
Tries to match the user agent for the supplied browser via regex . The regex ' s are written so we at least can match the vendor . It ' s key this method returns a " trueish " value if any match is made ( thus halting the OR chain in detect_user_agent )
def match_with(browser, regex)
    match = match_agent regex
    @version = BrowserVersion.new match.to_a.last if match && match.size > 1
    @browser = browser if match
  end
def match_with ( browser , regex ) match = match_agent regex @version = BrowserVersion . new match . to_a . last if match && match . size > 1 @browser = browser if match end
Tries to match the user agent for the supplied browser via regex.
Tries to match the user agent for the supplied browser via regex .
browser
regex