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.
123 124 125 |
# File 'lib/saml2/attribute.rb', line 123 def initialize(attributes = []) @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
121 122 123 |
# File 'lib/saml2/attribute.rb', line 121 def attributes @attributes end |
Instance Method Details
#build(builder) ⇒ Object
135 136 137 138 139 140 |
# File 'lib/saml2/attribute.rb', line 135 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
127 128 129 130 131 132 133 |
# File 'lib/saml2/attribute.rb', line 127 def from_xml(node) @attributes = node.xpath('saml:Attribute', Namespaces::ALL).map do |attr| Attribute.from_xml(attr) end super end |