Created
August 8, 2021 15:04
-
-
Save nejdetkadir/f82b18b26cdfcb012a1138d08e8eca07 to your computer and use it in GitHub Desktop.
How to generate qrcode with Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rqrcode" | |
qrcode = RQRCode::QRCode.new("http://github.com/") | |
# NOTE: showing with default options specified explicitly | |
svg = qrcode.as_svg( | |
color: "000", | |
shape_rendering: "crispEdges", | |
module_size: 11, | |
standalone: true, | |
use_path: true | |
) | |
IO.binwrite("./github-qrcode.svg", svg.to_s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment