Class: Chop::UnorderedList
- Defined in:
- lib/chop/unordered_list.rb
Instance Attribute Summary
Attributes inherited from Diff
#block, #header_transformations, #selector, #session, #table, #transformations
Instance Method Summary collapse
Methods inherited from Diff
#allow_not_found, #cell_to_image_filename, #cells, #diff!, diff!, #field, #hash_transformation, #header, #header_transformation, #image, #initialize, #rows, #text, #to_a, #transformation
Constructor Details
This class inherits a constructor from Chop::Diff
Instance Method Details
#nested ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/chop/unordered_list.rb', line 9 def nested self.rows_finder = ->(root) { recurse_tree [], root } self.text_finder = ->(cell) { cell.chop_prefix + cell.all(:xpath, "*[not(self::ul)]").map(&:text).join(" ").strip } end |