Skip to content

Commit

Permalink
Use RuboCop-preferred way to skip iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed May 18, 2018
1 parent 8484fe2 commit ddf1071
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions rb/lib/selenium/webdriver/remote/capabilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ class Capabilities
end
end

if key != :proxy
define_method "#{key}=" do |value|
@capabilities[key] = value
end
next if key == :proxy
define_method "#{key}=" do |value|
@capabilities[key] = value
end
end

Expand Down
7 changes: 3 additions & 4 deletions rb/lib/selenium/webdriver/remote/w3c/capabilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ class Capabilities
@capabilities.fetch(key)
end

if key != :proxy
define_method "#{key}=" do |value|
@capabilities[key] = value
end
next if key == :proxy
define_method "#{key}=" do |value|
@capabilities[key] = value
end
end

Expand Down

0 comments on commit ddf1071

Please sign in to comment.