Class: Xommelier::DS::Element
- Inherits:
-
Xml::Element
- Object
- Xml::Element
- Xommelier::DS::Element
- Defined in:
- lib/xommelier/ds.rb
Direct Known Subclasses
CanonicalizationMethod, DSAKeyValue, DigestMethod, KeyInfo, KeyValue, Manifest, Object, PGPData, RSAKeyValue, Reference, RetrievalMethod, SPKIData, Signature, SignatureMethod, SignatureProperties, SignatureProperty, SignatureValue, SignedInfo, Transform, Transforms, X509Data, X509IssuerSerial, Xommelier::DSIG11::Element
Constant Summary
Constants included from Xml::Element::Serialization
Xml::Element::Serialization::SAVE_OPTIONS, Xml::Element::Serialization::SERIALIZATION_OPTIONS
Instance Attribute Summary
Attributes inherited from Xml::Element
Attributes included from Xml::Element::Namespace
Class Method Summary collapse
- .any!(_options = {}) ⇒ Object
-
.attribute(name, options = {}) ⇒ Object
Defines containing attribute.
- .choice!(_options = {}) ⇒ Object
- .find_element_name ⇒ Object
- .has_algorithm(map = {}) ⇒ Object
- .sequence!(_options = {}) ⇒ Object
Methods inherited from Xml::Element
Methods included from Xml::Element::Serialization
#<=>, #==, #=~, #from_xml, #to_hash, #to_nokogiri, #to_s, #to_xml
Methods included from Xml::Element::Namespace
Constructor Details
This class inherits a constructor from Xommelier::Xml::Element
Class Method Details
.any!(_options = {}) ⇒ Object
58 59 60 |
# File 'lib/xommelier/ds.rb', line 58 def self.any!( = {}) # TODO: implement <any /> logic end |
.attribute(name, options = {}) ⇒ Object
Defines containing attribute
53 54 55 56 |
# File 'lib/xommelier/ds.rb', line 53 def self.attribute(name, = {}) [:as] ||= name.to_s.camelcase super(name, ) end |
.choice!(_options = {}) ⇒ Object
62 63 64 65 66 67 |
# File 'lib/xommelier/ds.rb', line 62 def self.choice!( = {}) # TODO: implement <choice /> logic may do yield end end |
.find_element_name ⇒ Object
48 49 50 |
# File 'lib/xommelier/ds.rb', line 48 def self.find_element_name name.demodulize end |
.has_algorithm(map = {}) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/xommelier/ds.rb', line 74 def self.has_algorithm(map = {}) attribute :algorithm, type: Uri, required: true const_set(:ALGORITHMS, map) map.each do |name, algorithm| define_singleton_method("new_#{name}") do | = {}| new(.merge(algorithm: algorithm)) end end define_method(:algorithm_name) do map.key(algorithm.to_s) end end |
.sequence!(_options = {}) ⇒ Object
69 70 71 72 |
# File 'lib/xommelier/ds.rb', line 69 def self.sequence!( = {}) # TODO: implement <choice /> logic yield end |