Class: Saml::Elements::AttributeStatement

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/saml/elements/attribute_statement.rb

Instance Method Summary collapse

Instance Method Details

#fetch_attribute(key) ⇒ Object



13
14
15
# File 'lib/saml/elements/attribute_statement.rb', line 13

def fetch_attribute(key)
  fetch_attributes(key).first
end

#fetch_attributes(key) ⇒ Object



17
18
19
# File 'lib/saml/elements/attribute_statement.rb', line 17

def fetch_attributes(key)
  attribute.find_all { |attr| attr.name == key }.flat_map(&:attribute_values).map(&:content)
end