Class: BaseValidator
- Inherits:
-
Object
- Object
- BaseValidator
- Defined in:
- lib/schemy/validators/base_validator.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(table) ⇒ BaseValidator
constructor
A new instance of BaseValidator.
-
#validate ⇒ Object
returns array of unindexed columns which should be indexed.
Constructor Details
#initialize(table) ⇒ BaseValidator
Returns a new instance of BaseValidator.
5 6 7 |
# File 'lib/schemy/validators/base_validator.rb', line 5 def initialize(table) @table = table end |
Instance Attribute Details
#table ⇒ Object (readonly)
Returns the value of attribute table.
3 4 5 |
# File 'lib/schemy/validators/base_validator.rb', line 3 def table @table end |
Instance Method Details
#validate ⇒ Object
returns array of unindexed columns which should be indexed
10 11 12 13 14 15 16 |
# File 'lib/schemy/validators/base_validator.rb', line 10 def validate @missing_indices = [] @table.columns.each do |column| validate_column column.name.to_s end @missing_indices end |