lib/browser/platform.rb in browser-2.3.0 vs lib/browser/platform.rb in browser-2.4.0

- old
+ new

@@ -1,6 +1,7 @@ # frozen_string_literal: true + require "browser/platform/base" require "browser/platform/ios" require "browser/platform/linux" require "browser/platform/windows" require "browser/platform/mac" @@ -46,15 +47,15 @@ @subject ||= self.class.matchers .map {|matcher| matcher.new(ua) } .find(&:match?) end - def adobe_air? - id == :adobe_air + def adobe_air?(expected_version = nil) + id == :adobe_air && detect_version?(version, expected_version) end - def chrome_os? - id == :chrome_os + def chrome_os?(expected_version = nil) + id == :chrome_os && detect_version?(version, expected_version) end def android?(expected_version = nil) id == :android && detect_version?(version, expected_version) end