Sha256: efa6c6cf9398bf82ac611c6c7e9b360783e9fe1b36a010549b737304f5e5f899

Contents?: true

Size: 640 Bytes

Versions: 5

Compression:

Stored size: 640 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)
        attributes[:digest_method] = Xmlenc::Builder::DigestMethod.new(:algorithm => digest_method_algorithm)
        super
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
xmlenc-0.3.0 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.2.1 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.2.0 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.1.7 lib/xmlenc/builder/encryption_method.rb
xmlenc-0.1.6 lib/xmlenc/builder/encryption_method.rb