Module: Inspector::Constraint

Included in:
Constraints, Inspector::Constraints::Email, Inspector::Constraints::Empty, Inspector::Constraints::False, Inspector::Constraints::Have, Inspector::Constraints::Predicate, Inspector::Constraints::True, Inspector::Constraints::Valid
Defined in:
lib/inspector/constraint.rb,
lib/inspector/constraint/violation.rb,
lib/inspector/constraint/validators.rb,
lib/inspector/constraint/violation/list.rb,
lib/inspector/constraint/validators/simple.rb,
lib/inspector/constraint/validators/validity.rb

Defined Under Namespace

Modules: Validators Classes: Violation

Instance Method Summary collapse

Instance Method Details

#negate!Object



6
7
8
# File 'lib/inspector/constraint.rb', line 6

def negate!
  @negative = true
end

#positive?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/inspector/constraint.rb', line 10

def positive?
  !@negative
end

#validatorObject



14
15
16
# File 'lib/inspector/constraint.rb', line 14

def validator
  :simple
end