# encoding: utf-8 # Hash class Hash # get html table string from key + value # # ==== Examples # # valid commma case # # { # :key_1 => :value1, # :key__2 => :value2, # :key___3 => :value3, # }.html_table # # result # # # # # # # # # # # # # # #
key_1value1
key__2value2
key___3value3
# def html_table ret = [keys, values].treduce(['']) do |ret, one, other| ret << " \n \n \n " ret end ret.join("\n") + "\n
#{one}#{other}
\n" end end