Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tidy up matcher

  • Loading branch information...
commit 7237d7edc4f4d7aaf0644ce58e0d38baf42a07ec 1 parent 1b66222
@despo authored
Showing with 3 additions and 6 deletions.
  1. +3 −6 lib/prickle/capybara.rb
View
9 lib/prickle/capybara.rb
@@ -28,12 +28,9 @@ def element type='*', identifier
private
def matcher identifier
- matcher = []
- identifier.each_pair do |key, value|
- matcher << " and " unless matcher.empty?
- matcher << "@#{key}='#{value}'"
- end
- matcher.join ''
+ return identifier.each_pair.to_a.map do |key, value|
+ "@#{key}='#{value}'"
+ end.join ' and '
end
def find_element_by xpath
Please sign in to comment.
Something went wrong with that request. Please try again.