Method: Nokogiri::XML::Searchable#ancestor!
- Defined in:
- lib/ryoba/nokogiri/xml/searchable.rb
#ancestor!(selector = nil) ⇒ Nokogiri::XML::Element
Like Searchable#ancestors!, but returns only the first matching ancestor.
130 131 132 |
# File 'lib/ryoba/nokogiri/xml/searchable.rb', line 130 def ancestor!(selector = nil) self.ancestors!(selector).first end |