Class: MasterDataTool::SpecConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/master_data_tool/spec_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spec_name:, application_record_class:, dump_ignore_tables: [], dump_ignore_columns: [], default_import_options: {}, logger: Logger.new(nil), preload_associations: {}, eager_load_associations: {}) ⇒ SpecConfig

Returns a new instance of SpecConfig.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/master_data_tool/spec_config.rb', line 6

def initialize(spec_name:, application_record_class:, dump_ignore_tables: [], dump_ignore_columns: [],
               default_import_options: {}, logger: Logger.new(nil), preload_associations: {}, eager_load_associations: {})

  @spec_name = spec_name.presence || ''
  @application_record_class = application_record_class
  @dump_ignore_tables = dump_ignore_tables
  @dump_ignore_columns = dump_ignore_columns
  @default_import_options = default_import_options
  @logger = logger
  @preload_associations = preload_associations # key: Class, value: associations
  @eager_load_associations = eager_load_associations # key: Class, value: associations

  freeze
end

Instance Attribute Details

#application_record_classObject (readonly)

Returns the value of attribute application_record_class.



3
4
5
# File 'lib/master_data_tool/spec_config.rb', line 3

def application_record_class
  @application_record_class
end

#default_import_optionsObject (readonly)

Returns the value of attribute default_import_options.



3
4
5
# File 'lib/master_data_tool/spec_config.rb', line 3

def default_import_options
  @default_import_options
end

#dump_ignore_columnsObject (readonly)

Returns the value of attribute dump_ignore_columns.



3
4
5
# File 'lib/master_data_tool/spec_config.rb', line 3

def dump_ignore_columns
  @dump_ignore_columns
end

#dump_ignore_tablesObject (readonly)

Returns the value of attribute dump_ignore_tables.



3
4
5
# File 'lib/master_data_tool/spec_config.rb', line 3

def dump_ignore_tables
  @dump_ignore_tables
end

#eager_load_associationsObject (readonly)

Returns the value of attribute eager_load_associations.



3
4
5
# File 'lib/master_data_tool/spec_config.rb', line 3

def eager_load_associations
  @eager_load_associations
end

#loggerObject (readonly)

Returns the value of attribute logger.



3
4
5
# File 'lib/master_data_tool/spec_config.rb', line 3

def logger
  @logger
end

#preload_associationsObject (readonly)

Returns the value of attribute preload_associations.



3
4
5
# File 'lib/master_data_tool/spec_config.rb', line 3

def preload_associations
  @preload_associations
end

#spec_nameObject (readonly)

Returns the value of attribute spec_name.



3
4
5
# File 'lib/master_data_tool/spec_config.rb', line 3

def spec_name
  @spec_name
end