Class: MasterDataTool::Verify::Config
- Inherits:
-
Object
- Object
- MasterDataTool::Verify::Config
- Defined in:
- lib/master_data_tool/verify/config.rb
Constant Summary collapse
- DEFAULT_VALUES =
{ only_tables: [], except_tables: [], preload_belongs_to_associations: true, preload_associations: {}, eager_load_associations: {} }
Instance Attribute Summary collapse
-
#eager_load_associations ⇒ Object
Returns the value of attribute eager_load_associations.
-
#except_tables ⇒ Object
Returns the value of attribute except_tables.
-
#only_tables ⇒ Object
Returns the value of attribute only_tables.
-
#preload_associations ⇒ Object
Returns the value of attribute preload_associations.
-
#preload_belongs_to_associations ⇒ Object
Returns the value of attribute preload_belongs_to_associations.
Class Method Summary collapse
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
-
#initialize(only_tables:, except_tables:, preload_belongs_to_associations:, preload_associations:, eager_load_associations:) ⇒ Config
constructor
A new instance of Config.
- #skip_table?(table_name) ⇒ Boolean
Constructor Details
#initialize(only_tables:, except_tables:, preload_belongs_to_associations:, preload_associations:, eager_load_associations:) ⇒ Config
Returns a new instance of Config.
16 17 18 19 20 21 22 |
# File 'lib/master_data_tool/verify/config.rb', line 16 def initialize(only_tables:, except_tables:, preload_belongs_to_associations:, preload_associations:, eager_load_associations:) @only_tables = only_tables @except_tables = except_tables @preload_belongs_to_associations = preload_belongs_to_associations @preload_associations = preload_associations @eager_load_associations = eager_load_associations end |
Instance Attribute Details
#eager_load_associations ⇒ Object
Returns the value of attribute eager_load_associations.
12 13 14 |
# File 'lib/master_data_tool/verify/config.rb', line 12 def eager_load_associations @eager_load_associations end |
#except_tables ⇒ Object
Returns the value of attribute except_tables.
12 13 14 |
# File 'lib/master_data_tool/verify/config.rb', line 12 def except_tables @except_tables end |
#only_tables ⇒ Object
Returns the value of attribute only_tables.
12 13 14 |
# File 'lib/master_data_tool/verify/config.rb', line 12 def only_tables @only_tables end |
#preload_associations ⇒ Object
Returns the value of attribute preload_associations.
12 13 14 |
# File 'lib/master_data_tool/verify/config.rb', line 12 def preload_associations @preload_associations end |
#preload_belongs_to_associations ⇒ Object
Returns the value of attribute preload_belongs_to_associations.
12 13 14 |
# File 'lib/master_data_tool/verify/config.rb', line 12 def preload_belongs_to_associations @preload_belongs_to_associations end |
Class Method Details
.default_config ⇒ Object
33 34 35 |
# File 'lib/master_data_tool/verify/config.rb', line 33 def default_config new(**DEFAULT_VALUES) end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
28 29 30 |
# File 'lib/master_data_tool/verify/config.rb', line 28 def configure yield self end |
#skip_table?(table_name) ⇒ Boolean
24 25 26 |
# File 'lib/master_data_tool/verify/config.rb', line 24 def skip_table?(table_name) MasterDataTool.need_skip_table?(table_name, only_tables, except_tables) end |