Class: Jdt::ManifestSchemaValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/jdt/manifest/validation.rb

Constant Summary collapse

SCHEMAS_FOLDER =
"#{File.dirname(__FILE__)}/schemas"
SCHEMAS =
{:manifest => "#{SCHEMAS_FOLDER}/manifest.xsd",
:library => "#{SCHEMAS_FOLDER}/library.xsd",
:plugin => "#{SCHEMAS_FOLDER}/plugin.xsd",
:module => "#{SCHEMAS_FOLDER}/module.xsd",
:component => "#{SCHEMAS_FOLDER}/component.xsd",
:template => "#{SCHEMAS_FOLDER}/template.xsd",
:language => "#{SCHEMAS_FOLDER}/language.xsd",
:package => "#{SCHEMAS_FOLDER}/package.xsd"}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(manifest) ⇒ ManifestSchemaValidator

Returns a new instance of ManifestSchemaValidator.



55
56
57
# File 'lib/jdt/manifest/validation.rb', line 55

def initialize(manifest)
  @manifest = manifest
end

Instance Attribute Details

#manifestObject

Returns the value of attribute manifest.



53
54
55
# File 'lib/jdt/manifest/validation.rb', line 53

def manifest
  @manifest
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/jdt/manifest/validation.rb', line 59

def valid?
  validate_manifest and validate_specific
end