$LOAD_PATH << '../lib' require 'html_format' html_format(nil) # => nil html_format(1) # => "
1
" 1.to_html # => "
1
" [].to_html # => nil "".to_html # => nil v = [ {id: 1, name: "alice", created_at: "2000-01-01"}, {id: 2, name: "bob", created_at: "2000-01-02"}, {id: 3, name: "carol", created_at: "2000-01-03"}, ] v.to_html # => "
idnamecreated_at
1alice2000-01-01
2bob2000-01-02
3carol2000-01-03
" v = {id: 1, name: "alice", created_at: "2000-01-01"} v.to_html # => "
id1
namealice
created_at2000-01-01
" v = [ [1, 2, 3], [4, 5, 6], [7, 8, 9], ] v.to_html # => "
123
456
789
" [0, 1, 2, 3].to_html # => "
0123
"