Class: Xmldsign::Document

Inherits:
XML::Document
  • Object
show all
Defined in:
lib/xmldsign/document.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.string(xml) ⇒ Object



3
4
5
# File 'lib/xmldsign/document.rb', line 3

def self.string(xml)
  new LibXML::XML::Document.string(xml)
end

Instance Method Details

#signatureObject



7
8
9
10
11
12
13
# File 'lib/xmldsign/document.rb', line 7

def signature
  if (node = find_first('.//ds:Signature'))
    Signature.new node
  else
    raise Xmldsign::NodeError, 'node ds:Signature is not found in document'
  end
end

#signedObject



15
16
17
# File 'lib/xmldsign/document.rb', line 15

def signed
  signature.sign
end