Class: Integer

Inherits:
Object show all
Defined in:
lib/bitcoin.rb

Instance Method Summary collapse

Instance Method Details

#itbObject



191
192
193
# File 'lib/bitcoin.rb', line 191

def itb
  to_even_length_hex.htb
end

#to_even_length_hexObject



186
187
188
189
# File 'lib/bitcoin.rb', line 186

def to_even_length_hex
  hex = to_s(16)
  hex.rjust((hex.length / 2.0).ceil * 2, '0')
end