Class: MasterDataTool::SpecConfig
- Inherits:
-
Object
- Object
- MasterDataTool::SpecConfig
- Defined in:
- lib/master_data_tool/spec_config.rb
Instance Attribute Summary collapse
-
#application_record_class ⇒ Object
readonly
Returns the value of attribute application_record_class.
-
#default_import_options ⇒ Object
readonly
Returns the value of attribute default_import_options.
-
#dump_ignore_columns ⇒ Object
readonly
Returns the value of attribute dump_ignore_columns.
-
#dump_ignore_tables ⇒ Object
readonly
Returns the value of attribute dump_ignore_tables.
-
#eager_load_associations ⇒ Object
readonly
Returns the value of attribute eager_load_associations.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#preload_associations ⇒ Object
readonly
Returns the value of attribute preload_associations.
-
#spec_name ⇒ Object
readonly
Returns the value of attribute spec_name.
Instance Method Summary collapse
-
#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
constructor
A new instance of SpecConfig.
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 = @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_class ⇒ Object (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_options ⇒ Object (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 end |
#dump_ignore_columns ⇒ Object (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_tables ⇒ Object (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_associations ⇒ Object (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 |
#logger ⇒ Object (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_associations ⇒ Object (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_name ⇒ Object (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 |