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.18.0 lib/saml/attribute_fetcher.rb