Module: PgVerify::Model::Validation

Defined in:
lib/pg-verify/model/validation/errors.rb,
lib/pg-verify/model/validation/validation.rb,
lib/pg-verify/model/validation/unknown_token_validation.rb,
lib/pg-verify/model/validation/empty_state_set_validation.rb,
lib/pg-verify/model/validation/foreign_assignment_validation.rb,
lib/pg-verify/model/validation/assignment_to_state_variable_validation.rb

Defined Under Namespace

Modules: AssignmentToStateVariableValidation, EmptyStateSetValidation, ForeignAssignmentValidation, UnknownTokenValidation Classes: AssignmentToStateVariableError, DeadlockInFSMError, EmptyStateSetError, ForeignVariableAssignmentError, UnknownTokenError, UnknownVariableError, ValidationError

Class Method Summary collapse

Class Method Details

.validate(model) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/pg-verify/model/validation/validation.rb', line 5

def self.validate(model)
    errors = []
    errors += EmptyStateSetValidation.validate(model)
    errors += UnknownTokenValidation.validate(model)
    errors += ForeignAssignmentValidation.validate(model)
    errors += AssignmentToStateVariableValidation.validate(model)
    return errors
end

.validate!(model) ⇒ Object

Raises:



14
15
16
17
18
# File 'lib/pg-verify/model/validation/validation.rb', line 14

def self.validate!(model)
    errors = validate(model)
    return if errors.empty?
    raise ValidationError.new(model, errors)
end