Sha256: 1ba6baa00e0e5921ab87d634a9d14887f648a73e61b6a26723d3ed318c10e69b

Contents?: true

Size: 561 Bytes

Versions: 2

Compression:

Stored size: 561 Bytes

Contents

module Saml
  module Elements
    class AttributeStatement
      include Saml::Base

      tag "AttributeStatement"
      register_namespace 'saml', Saml::SAML_NAMESPACE
      namespace 'saml'

      has_many :attribute, Saml::Elements::Attribute

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

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

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
libsaml-2.0.6 lib/saml/elements/attribute_statement.rb
libsaml-2.0.5 lib/saml/elements/attribute_statement.rb