Class: WsdlMapper::Dom::Validator
- Inherits:
-
Object
- Object
- WsdlMapper::Dom::Validator
- Defined in:
- lib/wsdl_mapper/dom/validator.rb
Defined Under Namespace
Classes: Error
Instance Method Summary (collapse)
-
- (Validator) initialize(schema)
constructor
A new instance of Validator.
- - (Object) validate
- - (Object) validate_roots
Constructor Details
- (Validator) initialize(schema)
Returns a new instance of Validator
16 17 18 |
# File 'lib/wsdl_mapper/dom/validator.rb', line 16 def initialize(schema) @schema = schema end |
Instance Method Details
- (Object) validate
20 21 22 23 24 |
# File 'lib/wsdl_mapper/dom/validator.rb', line 20 def validate @errors = [] validate_roots @errors end |
- (Object) validate_roots
26 27 28 29 30 31 32 33 |
# File 'lib/wsdl_mapper/dom/validator.rb', line 26 def validate_roots @schema.each_type do |type| next unless type.is_a?(::WsdlMapper::Dom::SimpleType) next if type.root.is_a?(::WsdlMapper::Dom::BuiltinType) @errors << Error.new(type, :invalid_root) end end |