Class: XmlSig::RetrievalMethod
- Inherits:
-
Object
- Object
- XmlSig::RetrievalMethod
- Defined in:
- lib/xml_sig/key_info.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
21 22 23 |
# File 'lib/xml_sig/key_info.rb', line 21 def type @type end |
#uri ⇒ Object
Returns the value of attribute uri.
20 21 22 |
# File 'lib/xml_sig/key_info.rb', line 20 def uri @uri end |
Instance Method Details
#to_xml(xml = Builder::XmlMarkup.new) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/xml_sig/key_info.rb', line 31 def to_xml(xml=Builder::XmlMarkup.new) attributes = {'URI' => uri} attributes['Type'] = type unless type.nil? xml.tag!('ds:RetrievalMethod', attributes) { transforms.each { |transform| xml << transform.to_xml } } end |
#transforms ⇒ Object
23 24 25 |
# File 'lib/xml_sig/key_info.rb', line 23 def transforms @transforms ||= [] end |
#validate ⇒ Object
27 28 29 |
# File 'lib/xml_sig/key_info.rb', line 27 def validate raise ValidationError, "URI is required" if uri.nil? end |