Class: DatabaseConsistency::Processors::BaseProcessor
- Inherits:
-
Object
- Object
- DatabaseConsistency::Processors::BaseProcessor
- Defined in:
- lib/database_consistency/processors/base_processor.rb
Overview
The base class for processors
Direct Known Subclasses
AssociationsProcessor, ColumnsProcessor, IndexesProcessor, ValidatorsFractionsProcessor, ValidatorsProcessor
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Instance Method Summary collapse
- #enabled_checkers ⇒ Array<Class>
-
#initialize(configuration = nil) ⇒ BaseProcessor
constructor
A new instance of BaseProcessor.
- #reports ⇒ Array<Hash>
Constructor Details
#initialize(configuration = nil) ⇒ BaseProcessor
Returns a new instance of BaseProcessor.
23 24 25 |
# File 'lib/database_consistency/processors/base_processor.rb', line 23 def initialize(configuration = nil) @configuration = configuration || Configuration.new end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
20 21 22 |
# File 'lib/database_consistency/processors/base_processor.rb', line 20 def configuration @configuration end |
Instance Method Details
#enabled_checkers ⇒ Array<Class>
33 34 35 |
# File 'lib/database_consistency/processors/base_processor.rb', line 33 def enabled_checkers self.class::CHECKERS.select { |checker| checker.enabled?(configuration) } end |
#reports ⇒ Array<Hash>
28 29 30 |
# File 'lib/database_consistency/processors/base_processor.rb', line 28 def reports @reports ||= check end |