Sha256: cee04ad63aee3420dde715840b4cb21229b24fd294f15a34a3162c44aba8468f

Contents?: true

Size: 509 Bytes

Versions: 61

Compression:

Stored size: 509 Bytes

Contents

module Saml
  module AttributeFetcher
    extend ActiveSupport::Concern

    included do
      def fetch_attribute(key)
        fetch_attribute_value(key).content
      end

      def fetch_attributes(key)
        fetch_attribute_values(key).map(&:content)
      end

      def fetch_attribute_value(key)
        fetch_attribute_values(key).first
      end

      def fetch_attribute_values(key)
        attributes.find_all { |attr| attr.name == key }.flat_map(&:attribute_values)
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
libsaml-3.1.0 lib/saml/attribute_fetcher.rb
libsaml-3.0.9 lib/saml/attribute_fetcher.rb
libsaml-2.24.3 lib/saml/attribute_fetcher.rb
libsaml-2.24.2 lib/saml/attribute_fetcher.rb
libsaml-3.0.8 lib/saml/attribute_fetcher.rb
libsaml-3.0.7 lib/saml/attribute_fetcher.rb
libsaml-3.0.6 lib/saml/attribute_fetcher.rb
libsaml-3.0.5 lib/saml/attribute_fetcher.rb
libsaml-3.0.4 lib/saml/attribute_fetcher.rb
libsaml-3.0.3 lib/saml/attribute_fetcher.rb
libsaml-3.0.2 lib/saml/attribute_fetcher.rb
libsaml-3.0.1 lib/saml/attribute_fetcher.rb
libsaml-2.24.1 lib/saml/attribute_fetcher.rb
libsaml-2.23.2 lib/saml/attribute_fetcher.rb
libsaml-2.23.1 lib/saml/attribute_fetcher.rb
libsaml-2.22.2 lib/saml/attribute_fetcher.rb
libsaml-2.22.1 lib/saml/attribute_fetcher.rb
libsaml-2.22.0 lib/saml/attribute_fetcher.rb
libsaml-2.21.3 lib/saml/attribute_fetcher.rb
libsaml-2.21.2 lib/saml/attribute_fetcher.rb