Class: Nandi::Validation::AddIndexValidator
- Inherits:
-
Object
- Object
- Nandi::Validation::AddIndexValidator
- Includes:
- FailureHelpers
- Defined in:
- lib/nandi/validation/add_index_validator.rb
Instance Attribute Summary collapse
-
#instruction ⇒ Object
readonly
Returns the value of attribute instruction.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(instruction) ⇒ AddIndexValidator
constructor
A new instance of AddIndexValidator.
Methods included from FailureHelpers
#assert, #collect_errors, #failure, #success
Constructor Details
#initialize(instruction) ⇒ AddIndexValidator
14 15 16 |
# File 'lib/nandi/validation/add_index_validator.rb', line 14 def initialize(instruction) @instruction = instruction end |
Instance Attribute Details
#instruction ⇒ Object (readonly)
Returns the value of attribute instruction.
27 28 29 |
# File 'lib/nandi/validation/add_index_validator.rb', line 27 def instruction @instruction end |
Class Method Details
.call(instruction) ⇒ Object
10 11 12 |
# File 'lib/nandi/validation/add_index_validator.rb', line 10 def self.call(instruction) new(instruction).call end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/nandi/validation/add_index_validator.rb', line 18 def call assert( not_using_hash_index?, "add_index: Nandi does not support hash indexes. Hash indexes typically have " \ "very specialized use cases. Please revert to using a btree index, or proceed " \ "with the creation of this index without using Nandi.", ) end |