Class: SAML2::AttributeStatement
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Attributes inherited from Base
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
134 135 136 137 138 139 |
# File 'lib/saml2/attribute.rb', line 134 def build(builder) builder['saml'].AttributeStatement('xmlns:xs' => Namespaces::XS, 'xmlns:xsi' => Namespaces::XSI) do |statement| @attributes.each { |attr| attr.build(statement) } end end |
#from_xml(node) ⇒ Object
127 128 129 130 131 132 |
# File 'lib/saml2/attribute.rb', line 127 def from_xml(node) super @attributes = node.xpath('saml:Attribute', Namespaces::ALL).map do |attr| Attribute.from_xml(attr) end end |