Class: ProformaXML::Validator
- Inherits:
-
ServiceBase
- Object
- ServiceBase
- ProformaXML::Validator
- Defined in:
- lib/proformaxml/services/validator.rb
Instance Method Summary collapse
-
#initialize(doc:, expected_version: nil) ⇒ Validator
constructor
A new instance of Validator.
- #perform ⇒ Object
Methods inherited from ServiceBase
Constructor Details
#initialize(doc:, expected_version: nil) ⇒ Validator
Returns a new instance of Validator.
5 6 7 8 9 |
# File 'lib/proformaxml/services/validator.rb', line 5 def initialize(doc:, expected_version: nil) super() @doc = doc @expected_version = expected_version end |
Instance Method Details
#perform ⇒ Object
11 12 13 14 15 16 |
# File 'lib/proformaxml/services/validator.rb', line 11 def perform version_name_extractor = VersionAndNamespaceExtractor.new doc: @doc @pro_ns, @doc_schema_version = version_name_extractor.perform&.values_at(:namespace, :version) validate end |