Module: PgPartitioning::Printer
- Included in:
- InputMaster, PartitioningMaster, Strategies::Base
- Defined in:
- lib/pg_partitioning/printer.rb
Constant Summary collapse
- COLORS =
[GREEN="\e[32m", WHITE="\e[0m", RED="\e[31m"]
Instance Method Summary collapse
- #alert(mes) ⇒ Object
- #info(mes) ⇒ Object
- #message(mes) ⇒ Object
- #print_row(mes, color = WHITE) ⇒ Object
- #text_color(color) ⇒ Object
Instance Method Details
#alert(mes) ⇒ Object
19 20 21 |
# File 'lib/pg_partitioning/printer.rb', line 19 def alert(mes) print_row mes, RED end |
#info(mes) ⇒ Object
15 16 17 |
# File 'lib/pg_partitioning/printer.rb', line 15 def info(mes) print_row mes, GREEN end |
#message(mes) ⇒ Object
23 24 25 |
# File 'lib/pg_partitioning/printer.rb', line 23 def (mes) print_row mes end |
#print_row(mes, color = WHITE) ⇒ Object
9 10 11 12 13 |
# File 'lib/pg_partitioning/printer.rb', line 9 def print_row(mes, color = WHITE) text_color color print mes + "\n" text_color WHITE end |
#text_color(color) ⇒ Object
5 6 7 |
# File 'lib/pg_partitioning/printer.rb', line 5 def text_color(color) print color end |