Class: RestPki::SignatureFinisher

Inherits:
Object
  • Object
show all
Defined in:
lib/rest_pki/signature_finisher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(restpki_client) ⇒ SignatureFinisher

Returns a new instance of SignatureFinisher.



6
7
8
9
10
11
12
13
# File 'lib/rest_pki/signature_finisher.rb', line 6

def initialize(restpki_client)
    @restpki_client = restpki_client
    @token = nil
    @signature = nil
    @callback_argument = nil
    @certificate_info = nil
    @done = false
end

Instance Attribute Details

#signatureObject

Returns the value of attribute signature.



4
5
6
# File 'lib/rest_pki/signature_finisher.rb', line 4

def signature
  @signature
end

#tokenObject

Returns the value of attribute token.



4
5
6
# File 'lib/rest_pki/signature_finisher.rb', line 4

def token
  @token
end

Instance Method Details

#certificate_infoObject



26
27
28
29
30
31
# File 'lib/rest_pki/signature_finisher.rb', line 26

def certificate_info
    unless @done
        raise 'The field "certificate_info" can only be accessed after calling the finish method'
    end
    @certificate_info
end

#finishObject



15
16
17
# File 'lib/rest_pki/signature_finisher.rb', line 15

def finish
    raise "#{self.class.name}#finish is an abstract method."
end

#get_callback_argumentObject



19
20
21
22
23
24
# File 'lib/rest_pki/signature_finisher.rb', line 19

def get_callback_argument
    unless @done
        raise 'The field "callback_argument" can only be accessed after calling the finish method'
    end
    @callback_argument
end