Skip to content

Instantly share code, notes, and snippets.

@antillas21
Created May 12, 2011 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antillas21/969221 to your computer and use it in GitHub Desktop.
Save antillas21/969221 to your computer and use it in GitHub Desktop.
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