Class: Chomchom::RegexPath
- Inherits:
-
Object
- Object
- Chomchom::RegexPath
- Defined in:
- lib/chomchom/regex_path.rb
Instance Method Summary collapse
Instance Method Details
#regex(node_set, re, atts) ⇒ Object
5 6 7 8 9 |
# File 'lib/chomchom/regex_path.rb', line 5 def regex(node_set, re, atts) node_set.find_all do |node| atts.split('|').detect { |att| node[att] =~ /#{re}/ } end end |