class PkiExpress::CadesSignature

Attributes

encapsulated_content_type[RW]
has_encapsulated_content[RW]
signers[RW]

Public Class Methods

new(model) click to toggle source
# File lib/pki_express/cades_signature.rb, line 5
def initialize(model)
  @encapsulated_content_type = nil
  @has_encapsulated_content = nil
  @signers = []

  unless model.nil?
    @encapsulated_content_type = model.fetch(:encapsulatedContentType)
    @has_encapsulated_content = model.fetch(:hasEncapsulatedContent)

    signers = model.fetch(:signers)
    if signers
      @signers = signers.map { |s| CadesSignerInfo.new(s) }
    end
  end
end