Class: DbBlaster::SourceTableConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/db_blaster/source_table_configuration.rb

Overview

PORO for source-table-configuration fields

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ SourceTableConfiguration

Returns a new instance of SourceTableConfiguration.



8
9
10
11
12
# File 'lib/db_blaster/source_table_configuration.rb', line 8

def initialize(params)
  params.each_key do |key|
    instance_variable_set("@#{key}", params[key])
  end
end

Instance Attribute Details

#batch_sizeObject (readonly)

Returns the value of attribute batch_size.



6
7
8
# File 'lib/db_blaster/source_table_configuration.rb', line 6

def batch_size
  @batch_size
end

#ignored_column_namesObject (readonly)

Returns the value of attribute ignored_column_names.



6
7
8
# File 'lib/db_blaster/source_table_configuration.rb', line 6

def ignored_column_names
  @ignored_column_names
end

#source_table_nameObject (readonly)

Returns the value of attribute source_table_name.



6
7
8
# File 'lib/db_blaster/source_table_configuration.rb', line 6

def source_table_name
  @source_table_name
end

Instance Method Details

#update_paramsObject



14
15
16
17
# File 'lib/db_blaster/source_table_configuration.rb', line 14

def update_params
  { batch_size: batch_size,
    ignored_columns: ignored_column_names }
end