Sha256: e8fd137dfc5684375cfee792c6d64c72fb492f5b4ef82c5bbd94f85d9b6959a1

Contents?: true

Size: 360 Bytes

Versions: 7

Compression:

Stored size: 360 Bytes

Contents

module Saml
  module Kit
    module XsdValidatable
      def matches_xsd?(xsd)
        Dir.chdir(File.dirname(xsd)) do
          xsd = Nokogiri::XML::Schema(IO.read(xsd))
          document = Nokogiri::XML(to_xml)
          xsd.validate(document).each do |error|
            errors[:base] << error.message
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
saml-kit-0.2.11 lib/saml/kit/xsd_validatable.rb
saml-kit-0.2.10 lib/saml/kit/xsd_validatable.rb
saml-kit-0.2.9 lib/saml/kit/xsd_validatable.rb
saml-kit-0.2.8 lib/saml/kit/xsd_validatable.rb
saml-kit-0.2.7 lib/saml/kit/xsd_validatable.rb
saml-kit-0.2.6 lib/saml/kit/xsd_validatable.rb
saml-kit-0.2.5 lib/saml/kit/xsd_validatable.rb