Class: Generamba::PrintTable
- Inherits:
-
Object
- Object
- Generamba::PrintTable
- Defined in:
- lib/generamba/helpers/print_table.rb
Overview
Provides methods for print parameters in nice table.
Class Method Summary collapse
-
.print_values(values: nil, title: nil) ⇒ Object
This method prints out all the user inputs in a nice table.
Class Method Details
.print_values(values: nil, title: nil) ⇒ Object
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 |