Closed ytbryan closed 6 years ago
Will you be interested in a PR that gives you a built-in .to_qr?
For example:
require 'rqrcode'
raw_block = File.open('spec/bitcoin/fixtures/rawblock-0.bin', 'rb') {|f| f.read} blk = Bitcoin::Protocol::Block.new(raw_block) blk.hash #=> 00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048 blk.hash.to_qr('img.png') #=> gives you a QR img.png
thanks for the question. i think that feature should come from other gem. for example there is already qrcode = RQRCode::QRCode.new(blk.hash, size: size, level: level) gem
qrcode = RQRCode::QRCode.new(blk.hash, size: size, level: level)
Will you be interested in a PR that gives you a built-in .to_qr?
For example:
require 'rqrcode'
raw_block = File.open('spec/bitcoin/fixtures/rawblock-0.bin', 'rb') {|f| f.read} blk = Bitcoin::Protocol::Block.new(raw_block) blk.hash #=> 00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048 blk.hash.to_qr('img.png') #=> gives you a QR img.png