Module: Prawn::Qr

Defined in:
lib/prawn-qr.rb,
lib/prawn-qr/qrcode.rb,
lib/prawn-qr/version.rb

Defined Under Namespace

Classes: QRCode

Constant Summary collapse

VERSION =
"0.0.2"

Instance Method Summary collapse

Instance Method Details

#qrcode(content) ⇒ Object

Public: Generates a QR code centered on the inside of the current boundaries.

content - The text content of the QR to be generated

Examples

Prawn::Document.generate "test.pdf" do
  qrcode "http://codegram.com"
end


17
18
19
# File 'lib/prawn-qr.rb', line 17

def qrcode(content)
  QRCode.new(self, content).draw
end