Method: Faker::Markdown.table
- Defined in:
- lib/faker/default/markdown.rb
.table ⇒ String
Produces a random 3x4 table with a row of headings, a row of hyphens and two rows of data
110 111 112 113 114 115 116 117 |
# File 'lib/faker/default/markdown.rb', line 110 def table table = [] 3.times do table << "#{Lorem.word} | #{Lorem.word} | #{Lorem.word}" end table.insert(1, '---- | ---- | ----') table.join("\n") end |