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-2.21.1 lib/saml/attribute_fetcher.rb
libsaml-2.21.0 lib/saml/attribute_fetcher.rb
libsaml-2.20.6 lib/saml/attribute_fetcher.rb
libsaml-2.20.5 lib/saml/attribute_fetcher.rb
libsaml-2.20.4 lib/saml/attribute_fetcher.rb
libsaml-2.20.3 lib/saml/attribute_fetcher.rb
libsaml-2.20.2 lib/saml/attribute_fetcher.rb
libsaml-2.20.1 lib/saml/attribute_fetcher.rb
libsaml-2.20.0 lib/saml/attribute_fetcher.rb
libsaml-2.19.10 lib/saml/attribute_fetcher.rb
libsaml-2.19.9 lib/saml/attribute_fetcher.rb
libsaml-2.19.8 lib/saml/attribute_fetcher.rb
libsaml-2.19.7 lib/saml/attribute_fetcher.rb
libsaml-2.19.5 lib/saml/attribute_fetcher.rb
libsaml-2.19.6 lib/saml/attribute_fetcher.rb
libsaml-2.19.4 lib/saml/attribute_fetcher.rb
libsaml-2.19.3 lib/saml/attribute_fetcher.rb
libsaml-2.19.2 lib/saml/attribute_fetcher.rb
libsaml-2.19.1 lib/saml/attribute_fetcher.rb
libsaml-2.18.1 lib/saml/attribute_fetcher.rb