Commit 9618770

mo <mo.khan@gmail.com>
2017-11-17 23:55:16
LogoutResponse < Document
1 parent cb9c6ff
Changed files (2)
lib/saml/kit/document.rb
@@ -18,7 +18,7 @@ module Saml
       end
 
       def to_xml
-        @content
+        content
       end
 
       def to_s
lib/saml/kit/logout_response.rb
@@ -1,12 +1,8 @@
 module Saml
   module Kit
-    class LogoutResponse
-      attr_reader :content, :name
-
+    class LogoutResponse < Document
       def initialize(xml)
-        @content = xml
-        @name = 'LogoutResponse'
-        @xml_hash = Hash.from_xml(xml)
+        super(xml, name: 'LogoutResponse')
       end
 
       def query_string_parameter
@@ -41,18 +37,10 @@ module Saml
         to_h[name]['Destination']
       end
 
-      def to_h
-        @xml_hash
-      end
-
       def provider
         registry.metadata_for(issuer)
       end
 
-      def to_xml
-        content
-      end
-
       private
 
       def registry