Class: Iron::Schema::Validation

Inherits:
Object
  • Object
show all
Defined in:
app/models/iron/schema/validation.rb

Constant Summary collapse

HANDLE_FORMAT =
/\A[a-z0-9_]+\z/

Instance Method Summary collapse

Constructor Details

#initialize(schema, prune: false) ⇒ Validation

In prune mode, objects in the database but not in the file are about to be destroyed, so only file-declared handles count as known.



7
8
9
10
11
# File 'app/models/iron/schema/validation.rb', line 7

def initialize(schema, prune: false)
  @schema = schema
  @prune = prune
  @problems = []
end

Instance Method Details

#problemsObject



13
14
15
16
17
18
# File 'app/models/iron/schema/validation.rb', line 13

def problems
  validate_locales
  validate_block_definitions
  validate_content_types
  @problems
end