Class: XmlSig::CanonicalizationMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/xml_sig/canonicalization_method.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm.



5
6
7
# File 'lib/xml_sig/canonicalization_method.rb', line 5

def algorithm
  @algorithm
end

Instance Method Details

#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object



11
12
13
14
# File 'lib/xml_sig/canonicalization_method.rb', line 11

def to_xml(xml=Builder::XmlMarkup.new)
  attributes = {'Algorightm' => algorithm}
  xml.tag!('ds:CanonicalizationMethod', attributes)
end

#validateObject

Raises:

  • (ValidationError)


7
8
9
# File 'lib/xml_sig/canonicalization_method.rb', line 7

def validate
  raise ValidationError, "Algorithm is required" if algorithm.nil?
end