Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/einvoice-qr-encryptor/core_ext/integer.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#to_8bit_hex_stringObject

Convert integer to 8-bit hexadecimal

Examples:

100.to_8bit_hex_string #=> "00000064"


6
7
8
# File 'lib/einvoice-qr-encryptor/core_ext/integer.rb', line 6

def to_8bit_hex_string
  to_s(16).rjust(8, '0')
end