Class: SAML2::AttributeStatement
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #build(builder) ⇒ Object
- #from_xml(node) ⇒ Object
-
#initialize(attributes = []) ⇒ AttributeStatement
constructor
A new instance of AttributeStatement.
Methods inherited from Base
from_xml, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml
Constructor Details
#initialize(attributes = []) ⇒ AttributeStatement
Returns a new instance of AttributeStatement.
122 123 124 |
# File 'lib/saml2/attribute.rb', line 122 def initialize(attributes = []) @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
120 121 122 |
# File 'lib/saml2/attribute.rb', line 120 def attributes @attributes end |
Instance Method Details
#build(builder) ⇒ Object
132 133 134 135 136 137 |
# File 'lib/saml2/attribute.rb', line 132 def build(builder) builder['saml'].AttributeStatement('xmlns:xs' => Namespaces::XS, 'xmlns:xsi' => Namespaces::XSI) do |builder| @attributes.each { |attr| attr.build(builder) } end end |
#from_xml(node) ⇒ Object
126 127 128 129 130 |
# File 'lib/saml2/attribute.rb', line 126 def from_xml(node) @attributes = node.xpath('saml:Attribute', Namespaces::ALL).map do |attr| Attribute.from_xml(attr) end end |