Permalink
Browse files

Add Dl#to_hash.

  • Loading branch information...
1 parent 5240f14 commit 01e8b27dbaa5bc6759be420e560e95a445c24ce7 @jarmo jarmo committed Aug 17, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/watir-classic/non_control_elements.rb
@@ -22,6 +22,17 @@ class Data < Element
attr_ole :value
end
+ class Dl < Element
+ def to_hash
+ dts.each_with_index.reduce({}) do |memo, item|
+ dt, i = *item
+ dd = dds[i]
+ memo[dt.text] = dd.present? ? dd.text : nil
+ memo
+ end
+ end
+ end
+
class Embed < Element
attr_ole :src
attr_ole :type

0 comments on commit 01e8b27

Please sign in to comment.