Class: FE::JavaSigner
- Inherits:
-
Object
- Object
- FE::JavaSigner
- Defined in:
- lib/facturacr/signer/signer.rb
Instance Method Summary collapse
-
#initialize(key_file, password, path, out_path) ⇒ JavaSigner
constructor
A new instance of JavaSigner.
- #sign ⇒ Object
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
#sign ⇒ Object
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 |