No commit activity in last 3 years
No release in over 3 years
Ruport::WikiTableFormatter is an extension for Ruport to format Ruport::Table data into wiki table format.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0

Runtime

>= 0
 Project Readme

Gem Version Build Status Maintainability codecov

Ruport::WikiTableFormatter

Ruport::WikiTableFormatter is an extention for Ruport to format Ruport::Table data into wiki table format.

Currently, Ruport::WikiTableFormatter supports following wiki formats:

  • Markdown

Installation

To install Ruport::WikiTableFormatter, hit command below:

$ gem install ruport-wiki-table-formatter

Or add this line to your Gemfile:

gem 'ruport-wiki-table-formatter'

Usage

To format Ruport::Table data into wiki table format, you only have to call following methods:

  • Markdown: #to_markdown

Here is an sample code:

require 'ruport'
require 'ruport/wiki_table_formatter'

table = Ruport.Table('Airport', 'IATA code', 'Opend')
table << ['Kansai'     , 'KIX', 1994]
table << ['Haneda'     , 'HND', 1931]
table << ['Narita'     , 'NRT', 1978]
table << ['New Chitose', 'CTS', 1988]

md = table.to_markdown
File.binwrite('sample.md', md)

Execute above sample code, Markdown table format below will be output:

Airport IATA code Opend
Kansai KIX 1994
Haneda HND 1931
Narita NRT 1978
New Chitose CTS 1988

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/taichi-ishitani/ruport-wiki-table-formatter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Copyright & License

Copyrigh (c) 2019 Taichi Ishitani.

Licensed under the MIT License, see LICENSE.txt for further details.