Class: RhetButler::SlideRenderers::Cues::XPathExtensions

Inherits:
Object
  • Object
show all
Defined in:
lib/rhet-butler/slide-renderers/cues.rb

Class Method Summary collapse

Class Method Details

.regex(node_set, pattern) ⇒ Object



9
10
11
12
13
14
# File 'lib/rhet-butler/slide-renderers/cues.rb', line 9

def self.regex(node_set, pattern)
  re = Regexp.new(pattern)
  node_set.find_all do |node|
    node.value =~ re
  end
end