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.13.1 lib/saml/attribute_fetcher.rb
libsaml-3.13.0 lib/saml/attribute_fetcher.rb
libsaml-3.12.0 lib/saml/attribute_fetcher.rb
libsaml-3.11.0 lib/saml/attribute_fetcher.rb
libsaml-3.10.0 lib/saml/attribute_fetcher.rb
libsaml-3.9.3 lib/saml/attribute_fetcher.rb
libsaml-3.9.2 lib/saml/attribute_fetcher.rb
libsaml-3.9.1 lib/saml/attribute_fetcher.rb
libsaml-3.9.0 lib/saml/attribute_fetcher.rb
libsaml-3.8.0 lib/saml/attribute_fetcher.rb
libsaml-3.7.0 lib/saml/attribute_fetcher.rb
libsaml-3.6.0 lib/saml/attribute_fetcher.rb
libsaml-3.5.0 lib/saml/attribute_fetcher.rb
libsaml-3.4.0 lib/saml/attribute_fetcher.rb
libsaml-3.3.0 lib/saml/attribute_fetcher.rb
libsaml-3.2.3 lib/saml/attribute_fetcher.rb
libsaml-3.2.2 lib/saml/attribute_fetcher.rb
libsaml-3.2.1 lib/saml/attribute_fetcher.rb
libsaml-3.1.2 lib/saml/attribute_fetcher.rb
libsaml-3.1.1 lib/saml/attribute_fetcher.rb