Class: FE::JavaSigner

Inherits:
Object
  • Object
show all
Defined in:
lib/facturacr/signer/signer.rb

Instance Method Summary collapse

Constructor Details

#initialize(key_file, password, path, out_path) ⇒ JavaSigner

Returns a new instance of JavaSigner.



283
284
285
286
287
288
# File 'lib/facturacr/signer/signer.rb', line 283

def initialize(key_file,password,path,out_path)
  @key_file = key_file
  @password = password
  @path = path
  @out_path = out_path
end

Instance Method Details

#signObject



290
291
292
293
# File 'lib/facturacr/signer/signer.rb', line 290

def sign
  null_device = Gem.win_platform? ? "/nul" : "/dev/null" 
  system("java -jar #{FE.bin}/signer/signer.jar #{@key_file} #{@password} #{@path} #{@out_path} 1>#{null_device} 2>#{null_device}")
end