Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Creating QRCodes with rqr gem
require 'rubygems'
require 'rqr'
string = "http://google.com"
mecard = "MECARD:N:Android OS;EMAIL:android@gmail.com;URL:http://google.com;;"
RQR::QRCode.create() do |qr|
qr.save(string, "google.jpg")
end
RQR::QRCode.create() do |qr|
qr.save(string, "google.png")
end
RQR::QRCode.create(:auto_extent => true) do |qr|
qr.save(mecard, "mecard.jpg")
end
RQR::QRCode.create(:auto_extent => true) do |qr|
qr.save(mecard, "mecard.png")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.