class OmfCommon::RelaxNGSchema

Constants

SCHEMA_FILE

Public Class Methods

new() click to toggle source
# File lib/omf_common/message/xml/relaxng_schema.rb, line 14
def initialize
  @rng = File.read(SCHEMA_FILE)
end

Public Instance Methods

validate(document) click to toggle source
# File lib/omf_common/message/xml/relaxng_schema.rb, line 18
def validate(document)
  Nokogiri::XML::RelaxNG(@rng).validate(document)
end