Sha256: 5196780bed3f8ce82e43bde34e5ec0d68c5ff2fd2fc0de108467861d2a1df600

Contents?: true

Size: 608 Bytes

Versions: 12

Compression:

Stored size: 608 Bytes

Contents

# frozen_string_literal: true

module Saml
  module Kit
    class AttributeStatement
      include XmlParseable

      attr_reader :content

      def initialize(node)
        @to_nokogiri = node
        @content = node.to_s
      end

      def attributes
        @attributes ||= search('./saml:Attribute').inject({}) do |memo, item|
          namespace = Saml::Kit::Document::NAMESPACES
          attribute = item.at_xpath('./saml:AttributeValue', namespace)
          memo[item.attribute('Name').value] = attribute.try(:text)
          memo
        end.with_indifferent_access
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
saml-kit-1.0.27 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.26 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.25 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.24 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.23 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.22 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.21 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.20 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.19 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.18 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.17 lib/saml/kit/attribute_statement.rb
saml-kit-1.0.16 lib/saml/kit/attribute_statement.rb