lib/watir/window_collection.rb in watir-7.1.0 vs lib/watir/window_collection.rb in watir-7.2.0
- old
+ new
@@ -1,11 +1,14 @@
+# frozen_string_literal: true
+
module Watir
class WindowCollection
include Enumerable
include Waitable
def initialize(browser, selector = {})
- unless selector.keys.all? { |k| %i[title url element].include? k }
+ types = %i[title url element]
+ unless selector.keys.all? { |k| types.include? k }
raise ArgumentError, "invalid window selector: #{selector.inspect}"
end
@browser = browser
@selector = selector