File: xpath_functions.rb

package info (click to toggle)
ruby-html-proofer 5.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,524 kB
  • sloc: ruby: 4,389; sh: 8; makefile: 4; javascript: 1; php: 1
file content (10 lines) | stat: -rw-r--r-- 251 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

module HTMLProofer
  # https://stackoverflow.com/a/8812293
  class XpathFunctions
    def case_sensitive_equals(node_set, str_to_match)
      node_set.find_all { |node| node.to_s == str_to_match.to_s }
    end
  end
end