Sha256: 38d76c17480f757014aa9d854af27ae4d3ff9f843dec1303e1e109851e670ad1

Contents?: true

Size: 689 Bytes

Versions: 15

Compression:

Stored size: 689 Bytes

Contents

module Xmlenc
  module Builder
    class EncryptionMethod
      include Xmlenc::Builder::Base

      tag "EncryptionMethod"

      register_namespace "xenc", Xmlenc::NAMESPACES[:xenc]
      namespace "xenc"

      attribute :algorithm, String, :tag => "Algorithm"
      has_one :digest_method, Xmlenc::Builder::DigestMethod

      validates :algorithm, :presence => true

      def initialize(attributes = {})
        digest_method_algorithm = attributes.delete(:digest_method_algorithm)
        if digest_method_algorithm
          attributes[:digest_method] = Xmlenc::Builder::DigestMethod.new(:algorithm => digest_method_algorithm)
        end
        super
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
xmlenc-0.8.0 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.7.1 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.7.0 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.6.9 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.6.8 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.6.6 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.6.5 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.6.4 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.6.3 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.6.2 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.6.1 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.6.0 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.5.0 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.4.1 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.4.0 lib/xmlenc/builder/encryption_method.rb