Class: DatabaseConsistency::Comparators::BaseComparator
- Inherits:
-
Object
- Object
- DatabaseConsistency::Comparators::BaseComparator
- Defined in:
- lib/database_consistency/comparators/base_comparator.rb
Overview
The base class for comparators
Direct Known Subclasses
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#validator ⇒ Object
readonly
Returns the value of attribute validator.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(validator, model, column) ⇒ BaseComparator
constructor
A new instance of BaseComparator.
- #report ⇒ Object
Constructor Details
#initialize(validator, model, column) ⇒ BaseComparator
Returns a new instance of BaseComparator.
9 10 11 12 13 |
# File 'lib/database_consistency/comparators/base_comparator.rb', line 9 def initialize(validator, model, column) @validator = validator @model = model @column = column end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
5 6 7 |
# File 'lib/database_consistency/comparators/base_comparator.rb', line 5 def column @column end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
5 6 7 |
# File 'lib/database_consistency/comparators/base_comparator.rb', line 5 def model @model end |
#validator ⇒ Object (readonly)
Returns the value of attribute validator.
5 6 7 |
# File 'lib/database_consistency/comparators/base_comparator.rb', line 5 def validator @validator end |
Class Method Details
.compare(validator, model, column) ⇒ Object
19 20 21 |
# File 'lib/database_consistency/comparators/base_comparator.rb', line 19 def self.compare(validator, model, column) new(validator, model, column).compare end |