Skip to content

Commit

Permalink
Update qrcode.rb
Browse files Browse the repository at this point in the history
Removed chomps, added ARGV[0] to the #{data} variable
  • Loading branch information
lbhopper authored Nov 11, 2023
1 parent a8b6cc5 commit c7a81e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions qrcode.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
require 'rqrcode_png'

puts "Enter the QR code data"
data = gets.chomp

data = ARGV[0]
qrcode = RQRCode::QRCode.new(data)

size = 250

png = qrcode.as_png(size: size)

File.open('qrcodes/qrcode.png', 'wb') { |file| file.write(png) }

0 comments on commit c7a81e5

Please sign in to comment.