Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <td>
  2. Level 1
  3. <br>
  4. Attribute A: 24%
  5. <br>
  6. Attribute B: 14%
  7. <br>
  8. Attribute C: 15.5%
  9. </td>
  10.  
  11. row.xpath('tr').each_with_index do |td, j|
  12. split_array << td.text.squish.split('%')
  13. end
  14.  
  15. [["Level: 1 Attribute A: 24", "Attribute B: 14", "Attribute C, 15.5"],["Level: 2 Atribute A: 36", ..etc]..etc]
  16.  
  17. [{:statistic => "Attribute A", :level_1 => 24.0},{:statistic => "Attribute B", :level_1 => 14.0},{:statistic => "Attribute C", :level_1 => 15.5}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement