lib/saml/kit/invalid_document.rb in saml-kit-0.2.17 vs lib/saml/kit/invalid_document.rb in saml-kit-0.2.18
- old
+ new
@@ -1,13 +1,20 @@
module Saml
module Kit
+ # {include:file:spec/saml/invalid_document_spec.rb}
class InvalidDocument < Document
validate do |model|
model.errors[:base] << model.error_message(:invalid)
end
- def initialize(xml)
+ def initialize(xml, configuration: nil)
super(xml, name: "InvalidDocument")
+ end
+
+ def to_h
+ super
+ rescue
+ {}
end
end
end
end