Module: Hpricot::IMWExtensions
Instance Method Summary collapse
Instance Method Details
#class_of(path) ⇒ Object
12 13 14 |
# File 'lib/titi/ignore/hpricot.rb', line 12 def class_of path self.path_attr_safely(path, 'class') end |
#contents_of(path) ⇒ Object
4 5 6 7 |
# File 'lib/titi/ignore/hpricot.rb', line 4 def contents_of path cnts = self.at path cnts.inner_html if cnts end |
#path_attr(path, attr) ⇒ Object
8 9 10 11 |
# File 'lib/titi/ignore/hpricot.rb', line 8 def path_attr path, attr cnts = self.at path cnts.attributes[attr] if cnts end |