一个用于编码 QR 码的 Ruby 库
RQRCode 是一个用于创建和渲染二维码的库,支持各种格式。它具有简单的接口,提供所有标准的二维码选项。它是由 Kazuhiko Arase 根据 JavaScript 库改编而成。
>= 3.2.0将以下行添加到您应用程序的 Gemfile 中:
gem "rqrcode", "~> 3.0"或手动安装:
gem install rqrcoderequire "rqrcode"
qr = RQRCode::QRCode.new("https://kyan.com")
puts qr.to_s
# to_s( dark: "x", light: " " ) # defaults
xxxxxxx xxxxxxx xxx xxxxxxx
x x x xxx xx x x
x xxx x xx x x xx x xxx x
x xxx x xx xx xx x xxx x
x xxx x x x xxx x xxx x
x x xxx x xx x x x x
...很简单,但不太可能可读。为此,您需要使用下面的许多 渲染选项。
这些是底层 rqrcode_core 提供的各种 QR 码生成选项。如果您不需要 rqrcode 提供的各种渲染选项,但只需要数据结构,则实际上只需要这个库。
暂无开放 Issues,或尚未同步最近议题。