lian / bitcoin-ruby

bitcoin utils and protocol in ruby.
Other
922 stars 322 forks source link

Will you be interested in a PR that gives you a built-in .to_qr? #225

Closed ytbryan closed 6 years ago

ytbryan commented 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

lian commented 6 years ago

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