I have a hexadecimal number as
hexMidAppId = '0001000000000002'
In node.js, we have a library new Buffer(hexMidAppId, 'hex') which gives me the output as
<Buffer 00 01 00 00 00 00 00 02>
now the same output i want to get it in ruby but i couldn't find any equivalent method in ruby for the Buffer method. Can anyone help me this?
You actually have String and you want to output it with spaces between each two sequential characters. So, you can do scan & join