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

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 message(mes)
  print_row mes
end


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