From 5a1b64b97be04c5c01cd0298bba6e576c1c9109d Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Wed, 27 Jan 2016 19:58:26 +0000 Subject: [PATCH] Remove unused match_browser function --- core/main/constants/browsers.rb | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/core/main/constants/browsers.rb b/core/main/constants/browsers.rb index 6be121f69..11c828d65 100644 --- a/core/main/constants/browsers.rb +++ b/core/main/constants/browsers.rb @@ -56,33 +56,6 @@ module Constants end - # Attempt to match the browserstring to a browser constant - # @param [String] browserstring Browser UA string - # @return [Array] An array of matching browser constants - # @todo Confirm this function returns an array if multiple constants are matched - def self.match_browser(browserstring) - matches = [] - browserstring.split(" ").each do |chunk| - case chunk - when /Firefox/, /FF/ - matches << FF - when /Mozilla/ - matches << M - when /Internet Explorer/, /IE/ - matches << IE - when /Safari/ - matches << S - when /Konqueror/ - matches << K - when /Chrome/ - matches << C - when /Opera/ - matches << O - end - end - matches.uniq - end - end end