Skip to content

floraison/cerata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cerata

tests Gem Version

Tabula cerata formatting for floraison and flor, data to string formatting.

Cerata.horizontal_a_to_s(array, indent='')

TODO

Cerata.horizontal_h_to_s(hash, indent='')

TODO

Cerata.vertical_h_to_s(hash, indent='')

TODO

Cerata.table_to_s(array_of_hashes, indent='')

require 'cerata'

a = [
  { name: 'Haddock', age: 52 },
  { name: 'Tintin', age: 31, weight: 60 },
  { name: 'Castafiore', id: 123, age: 59, height: 163 },
  { name: 'Milou', id: 12, age: 3, height: 20 } ]

puts Cerata.table_to_s(a)
  # =>
%{
[
{ name: "Haddock"   , age: 52,                                  },
{ name: "Tintin"    , age: 31, weight: 60,                      },
{ name: "Castafiore", age: 59,             id: 123, height: 163 },
{ name: "Milou"     , age:  3,             id:  12, height:  20 },
]
}

LICENSE

MIT, see LICENSE.txt

About

tabula cerata formatting for floraison and flor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •