Module: Libra::BinaryExtensions

Included in:
String
Defined in:
lib/libra_client.rb

Instance Method Summary collapse

Instance Method Details

#bin2hexObject

bin-to-hex



22
# File 'lib/libra_client.rb', line 22

def bin2hex; unpack("H*")[0]; end

#hex2binObject

hex-to-bin



24
# File 'lib/libra_client.rb', line 24

def hex2bin; [self].pack("H*"); end