Sha256: d578505f48e46e7b2936739803480fdf7b9dd8a6bf604690bab56580a0accd6a

Contents?: true

Size: 682 Bytes

Versions: 1

Compression:

Stored size: 682 Bytes

Contents

#!/usr/bin/env ruby
# encoding: UTF-8
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__)) + "/../lib"

require "thor"
require "tablelize"

module Tablelize
  class Cli < Thor
    desc "version", "Show the current version"
    def version
      puts VERSION
    end

    desc "example", "Shows an example"
    def example
      rows = [["KEY", "VALUE", "NUMBER", "ALMOST_A_NUMBER"]]
      rows << ["name", "tablelize", 1, 2]
      rows << ["version", Tablelize::VERSION, 1.2, 3]
      rows << ["π", "10 digits of pie", 3.1415926535, 3]
      rows << ["some very long text", "Fake moose", 3.14, "3a"]
      Tablelize::table rows
    end
  end
end

Tablelize::Cli.start(ARGV)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tablelize-0.1.5 bin/tablelize