Class: Hpricot::Doc
- Inherits:
-
Object
- Object
- Hpricot::Doc
- Includes:
- AssertXPath::CommonXPathExtensions
- Defined in:
- lib/assert_xpath.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#[](index) ⇒ Object
:nodoc:.
-
#method_missing(*args, &block) ⇒ Object
:nodoc:.
- #text ⇒ Object
Methods included from AssertXPath::CommonXPathExtensions
#identifiable?, #raise_magic_member_not_found, #symbolic?, #tribute
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
:nodoc:
821 822 823 824 825 826 827 828 829 830 831 832 833 834 |
# File 'lib/assert_xpath.rb', line 821 def method_missing(*args, &block) #:nodoc: # if got = search(symbol).first get first descendant working here! # ERGO call root here symbol = args.first.to_s.sub(/\!$/, '') root.children.grep(Hpricot::Elem).each do |kid| if kid.name == symbol return kid.drill(&block) # ERGO assert on return value # ERGO pass kid in for if you want it end end # ERGO raise here? end |