Method: SXRB::Proxy#descendant
- Defined in:
- lib/sxrb/proxy.rb
#descendant(*tags) {|Proxy| ... } ⇒ nil
TODO:
Add Regexp and other selectors support in addition to strings.
Defines descendant of an element defined in current block.
49 50 51 52 53 54 55 |
# File 'lib/sxrb/proxy.rb', line 49 def descendant(*, &block) .each do |tag| @callback_tree.add_rule(tag, @current_path, :recursive => true).tap do |new_path| block.call(Proxy.new(@callback_tree, new_path)) end end end |