Class: Indexter::Validator
- Inherits:
-
Object
- Object
- Indexter::Validator
- Defined in:
- lib/indexter/validator.rb
Constant Summary collapse
- DEFAULT_FORMATTER =
'hash'
- DEFAULT_EXCLUSIONS =
{ 'schema_migrations' => [] }.freeze
- DEFAULT_SUFFIXES =
['_id', '_uuid'].freeze
Instance Attribute Summary collapse
-
#exclusions ⇒ Object
readonly
Returns the value of attribute exclusions.
-
#formatter ⇒ Object
readonly
Returns the value of attribute formatter.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#suffixes ⇒ Object
readonly
Returns the value of attribute suffixes.
Instance Method Summary collapse
-
#initialize(config: nil) ⇒ Validator
constructor
——————– Instance Methods ——————–.
- #validate ⇒ Object
Constructor Details
#initialize(config: nil) ⇒ Validator
——————– Instance Methods ——————–
13 14 15 |
# File 'lib/indexter/validator.rb', line 13 def initialize(config: nil) configure(config) end |
Instance Attribute Details
#exclusions ⇒ Object (readonly)
Returns the value of attribute exclusions.
5 6 7 |
# File 'lib/indexter/validator.rb', line 5 def exclusions @exclusions end |
#formatter ⇒ Object (readonly)
Returns the value of attribute formatter.
5 6 7 |
# File 'lib/indexter/validator.rb', line 5 def formatter @formatter end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
5 6 7 |
# File 'lib/indexter/validator.rb', line 5 def results @results end |
#suffixes ⇒ Object (readonly)
Returns the value of attribute suffixes.
5 6 7 |
# File 'lib/indexter/validator.rb', line 5 def suffixes @suffixes end |
Instance Method Details
#validate ⇒ Object
17 18 19 20 21 22 |
# File 'lib/indexter/validator.rb', line 17 def validate missing = missing_indexes(tables) output = build_results(missing) results = formatter.new.format(output) end |