Module: WatirNokogiri::XpathSupport
- Defined in:
- lib/watir-nokogiri/xpath_support.rb
Class Method Summary collapse
Class Method Details
.downcase(value) ⇒ Object
17 18 19 |
# File 'lib/watir-nokogiri/xpath_support.rb', line 17 def self.downcase(value) "translate(#{value},'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" end |
.escape(value) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/watir-nokogiri/xpath_support.rb', line 6 def self.escape(value) if value.include? "'" parts = value.split("'", -1).map { |part| "'#{part}'" } string = parts.join(%{,"'",}) "concat(#{string})" else "'#{value}'" end end |