Class: MasterDataTool::Dump::Config
- Inherits:
-
Object
- Object
- MasterDataTool::Dump::Config
- Defined in:
- lib/master_data_tool/dump/config.rb
Constant Summary collapse
- DEFAULT_IGNORE_TABLES =
%w[ar_internal_metadata schema_migrations master_data_statuses]
- DEFAULT_IGNORE_COLUMNS =
%w[created_at updated_at]
- DEFAULT_VALUES =
{ ignore_empty_table: true, ignore_tables: [], ignore_column_names: [], only_tables: [], }
Instance Attribute Summary collapse
-
#ignore_column_names ⇒ Object
Returns the value of attribute ignore_column_names.
-
#ignore_empty_table ⇒ Object
Returns the value of attribute ignore_empty_table.
-
#ignore_tables ⇒ Object
Returns the value of attribute ignore_tables.
-
#only_tables ⇒ Object
Returns the value of attribute only_tables.
Class Method Summary collapse
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
-
#initialize(ignore_empty_table:, ignore_tables:, ignore_column_names:, only_tables:) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(ignore_empty_table:, ignore_tables:, ignore_column_names:, only_tables:) ⇒ Config
Returns a new instance of Config.
16 17 18 19 20 21 |
# File 'lib/master_data_tool/dump/config.rb', line 16 def initialize(ignore_empty_table:, ignore_tables:, ignore_column_names:, only_tables:) @ignore_empty_table = ignore_empty_table @ignore_tables = DEFAULT_IGNORE_TABLES + ignore_tables @ignore_column_names = DEFAULT_IGNORE_COLUMNS + ignore_column_names @only_tables = only_tables end |
Instance Attribute Details
#ignore_column_names ⇒ Object
Returns the value of attribute ignore_column_names.
14 15 16 |
# File 'lib/master_data_tool/dump/config.rb', line 14 def ignore_column_names @ignore_column_names end |
#ignore_empty_table ⇒ Object
Returns the value of attribute ignore_empty_table.
14 15 16 |
# File 'lib/master_data_tool/dump/config.rb', line 14 def ignore_empty_table @ignore_empty_table end |
#ignore_tables ⇒ Object
Returns the value of attribute ignore_tables.
14 15 16 |
# File 'lib/master_data_tool/dump/config.rb', line 14 def ignore_tables @ignore_tables end |
#only_tables ⇒ Object
Returns the value of attribute only_tables.
14 15 16 |
# File 'lib/master_data_tool/dump/config.rb', line 14 def only_tables @only_tables end |
Class Method Details
.default_config ⇒ Object
36 37 38 |
# File 'lib/master_data_tool/dump/config.rb', line 36 def default_config new(**DEFAULT_VALUES) end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
23 24 25 |
# File 'lib/master_data_tool/dump/config.rb', line 23 def configure yield self end |