Class: Saml::Elements::AttributeStatement

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ AttributeStatement

Returns a new instance of AttributeStatement.



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

def initialize(*args)
  options     = args.extract_options!
  super(*(args << options))
end

Instance Method Details

#fetch_attribute(key) ⇒ Object



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

def fetch_attribute(key)
  attribute = self.attribute.find do |attr|
    attr.name == key
  end
  attribute.attribute_value if attribute
end