Sha256: 68e7f08b2e39ca60200e66d30545c0cc751a7268aff6bd7b883d2c0fa31ddbe8

Contents?: true

Size: 515 Bytes

Versions: 17

Compression:

Stored size: 515 Bytes

Contents

# frozen_string_literal: true

module Saml
  module Kit
    # This class represents an invalid SAML
    # document that could not be parsed.
    # {include:file:spec/saml/kit/invalid_document_spec.rb}
    class InvalidDocument < Document
      validate do |model|
        model.errors[:base] << model.error_message(:invalid)
      end

      def initialize(xml, *)
        super(xml, name: 'InvalidDocument')
      end

      def to_h
        super
      rescue StandardError
        {}
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
saml-kit-1.1.0 lib/saml/kit/invalid_document.rb
saml-kit-1.0.31 lib/saml/kit/invalid_document.rb
saml-kit-1.0.30 lib/saml/kit/invalid_document.rb
saml-kit-1.0.29 lib/saml/kit/invalid_document.rb
saml-kit-1.0.28 lib/saml/kit/invalid_document.rb
saml-kit-1.0.27 lib/saml/kit/invalid_document.rb
saml-kit-1.0.26 lib/saml/kit/invalid_document.rb
saml-kit-1.0.25 lib/saml/kit/invalid_document.rb
saml-kit-1.0.24 lib/saml/kit/invalid_document.rb
saml-kit-1.0.23 lib/saml/kit/invalid_document.rb
saml-kit-1.0.22 lib/saml/kit/invalid_document.rb
saml-kit-1.0.21 lib/saml/kit/invalid_document.rb
saml-kit-1.0.20 lib/saml/kit/invalid_document.rb
saml-kit-1.0.19 lib/saml/kit/invalid_document.rb
saml-kit-1.0.18 lib/saml/kit/invalid_document.rb
saml-kit-1.0.17 lib/saml/kit/invalid_document.rb
saml-kit-1.0.16 lib/saml/kit/invalid_document.rb