Class: Saml::Elements::AttributeStatement
- Inherits:
-
Object
- Object
- Saml::Elements::AttributeStatement
- Includes:
- Base
- Defined in:
- lib/saml/elements/attribute_statement.rb
Instance Method Summary collapse
- #fetch_attribute(key) ⇒ Object
- #fetch_attribute_value(key) ⇒ Object
- #fetch_attribute_values(key) ⇒ Object
- #fetch_attributes(key) ⇒ Object
Instance Method Details
#fetch_attribute(key) ⇒ Object
13 14 15 |
# File 'lib/saml/elements/attribute_statement.rb', line 13 def fetch_attribute(key) fetch_attribute_value(key).content end |
#fetch_attribute_value(key) ⇒ Object
21 22 23 |
# File 'lib/saml/elements/attribute_statement.rb', line 21 def fetch_attribute_value(key) fetch_attribute_values(key).first end |
#fetch_attribute_values(key) ⇒ Object
25 26 27 |
# File 'lib/saml/elements/attribute_statement.rb', line 25 def fetch_attribute_values(key) attribute.find_all { |attr| attr.name == key }.flat_map(&:attribute_values) end |
#fetch_attributes(key) ⇒ Object
17 18 19 |
# File 'lib/saml/elements/attribute_statement.rb', line 17 def fetch_attributes(key) fetch_attribute_values(key).map(&:content) end |