Class: Hash

Inherits:
Object show all
Defined in:
lib/html_inspector/core_ext/hash.rb

Instance Method Summary collapse

Instance Method Details

#html_inspectObject



2
3
4
5
6
7
8
9
# File 'lib/html_inspector/core_ext/hash.rb', line 2

def html_inspect
  table = '<table>'
  self.each_pair do |key, value|
    table << "<tr><th>#{key.html_inspect}</th>" \
             "<td>#{value.html_inspect}</td></tr>"
  end
  table << '</table>'
end