Module: PageRecognizer::Dumpable
- Defined in:
- lib/pagerecognizer.rb
Instance Method Summary collapse
Instance Method Details
#dump ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/pagerecognizer.rb', line 11 def dump "<html><body style='white-space: nowrap'>#{ map.with_index do |n, i| "<div id='#{i}' style='position: absolute; background-color: hsla(#{ 360 * i / size },100%,50%,0.5); top: #{n.top}; left: #{n.left}; width: #{n.width}; height: #{n.height}'>#{i} #{ n.node.tag_name.upcase }</div>" end.join }</body></html>" end |