Class: Universign::SignatureField

Inherits:
Object
  • Object
show all
Defined in:
lib/universign/signature_field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(coordinate:, name: nil, page:, signer_index: 0) ⇒ SignatureField

Returns a new instance of SignatureField.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/universign/signature_field.rb', line 5

def initialize(coordinate:, name: nil, page:, signer_index: 0)
  @coordinate   = coordinate || [0, 0]
  @name         = name
  @page         = page
  @signer_index = signer_index

  @params = {
    page:          @page,
    x:             @coordinate[0],
    y:             @coordinate[1],
    'signerIndex': @signer_index
  }

  @params[:name] = @name unless @name.nil?

  @params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



3
4
5
# File 'lib/universign/signature_field.rb', line 3

def params
  @params
end