Class: Generamba::PrintTable

Inherits:
Object
  • Object
show all
Defined in:
lib/generamba/helpers/print_table.rb

Overview

Provides methods for print parameters in nice table.

Class Method Summary collapse

Class Method Details

This method prints out all the user inputs in a nice table.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/generamba/helpers/print_table.rb', line 5

def self.print_values(values: nil, title: nil)
  require 'terminal-table'

  params = {}
  params[:rows] = values
  params[:title] = title.green if title

  puts ''
  puts Terminal::Table.new(params)
  puts ''
end