Class: DatabaseConsistency::Checkers::ForeignKeyChecker::Report
- Defined in:
- lib/database_consistency/checkers/association_checkers/foreign_key_checker.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#foreign_key ⇒ Object
readonly
Returns the value of attribute foreign_key.
-
#foreign_table ⇒ Object
readonly
Returns the value of attribute foreign_table.
-
#primary_key ⇒ Object
readonly
Returns the value of attribute primary_key.
-
#primary_table ⇒ Object
readonly
Returns the value of attribute primary_table.
Attributes inherited from Report
#checker_name, #column_or_attribute_name, #error_message, #error_slug, #status, #table_or_model_name
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(primary_table:, foreign_table:, primary_key:, foreign_key:, **args) ⇒ Report
constructor
A new instance of Report.
Constructor Details
#initialize(primary_table:, foreign_table:, primary_key:, foreign_key:, **args) ⇒ Report
10 11 12 13 14 15 16 |
# File 'lib/database_consistency/checkers/association_checkers/foreign_key_checker.rb', line 10 def initialize(primary_table:, foreign_table:, primary_key:, foreign_key:, **args) super(**args) @primary_table = primary_table @primary_key = primary_key @foreign_table = foreign_table @foreign_key = foreign_key end |
Instance Attribute Details
#foreign_key ⇒ Object (readonly)
Returns the value of attribute foreign_key.
8 9 10 |
# File 'lib/database_consistency/checkers/association_checkers/foreign_key_checker.rb', line 8 def foreign_key @foreign_key end |
#foreign_table ⇒ Object (readonly)
Returns the value of attribute foreign_table.
8 9 10 |
# File 'lib/database_consistency/checkers/association_checkers/foreign_key_checker.rb', line 8 def foreign_table @foreign_table end |
#primary_key ⇒ Object (readonly)
Returns the value of attribute primary_key.
8 9 10 |
# File 'lib/database_consistency/checkers/association_checkers/foreign_key_checker.rb', line 8 def primary_key @primary_key end |
#primary_table ⇒ Object (readonly)
Returns the value of attribute primary_table.
8 9 10 |
# File 'lib/database_consistency/checkers/association_checkers/foreign_key_checker.rb', line 8 def primary_table @primary_table end |
Instance Method Details
#attributes ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/database_consistency/checkers/association_checkers/foreign_key_checker.rb', line 18 def attributes super.merge( primary_table: primary_table, primary_key: primary_key, foreign_table: foreign_table, foreign_key: foreign_key ) end |