Class: Hpricot::Elem
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#ancestors ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/undress.rb', line 36 def ancestors node, ancestors = parent, Elements[] while node.respond_to?(:parent) && node.parent ancestors << node node = node.parent end ancestors end |