Class: Gamma::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/gamma/command.rb

Direct Known Subclasses

Apply, Dryrun

Defined Under Namespace

Classes: Apply, Dryrun

Instance Method Summary collapse

Instance Method Details

#gamma_tables(in_client, out_client, data_parser) ⇒ Object



2
3
4
# File 'lib/gamma/command.rb', line 2

def gamma_tables(in_client, out_client, data_parser)
  database_exist_tables = database_tables(in_client, out_client, data_parser)
end

#loggerObject



13
14
15
# File 'lib/gamma/command.rb', line 13

def logger
  @_logger ||= Logger.new(STDOUT)
end

#output_setting_warning(tables) ⇒ Object



6
7
8
9
10
11
# File 'lib/gamma/command.rb', line 6

def output_setting_warning(tables)
  dup_tables = tables.group_by { |t| t.table_name }.select { |k, v| v.size > 1 }.map(&:first)
  dup_tables.each do |tname|
    logger.warn("Table *#{tname}* settings are duplicated. Please review your data settings.".red)
  end
end