Skip to content

Commit

Permalink
Added module, class, and method comment documentation, and added a co…
Browse files Browse the repository at this point in the history
…nvenience module method for encoding to HTML format.
  • Loading branch information
scottwb committed Oct 4, 2009
1 parent 368d51d commit 8dd7b55
Show file tree
Hide file tree
Showing 2 changed files with 362 additions and 56 deletions.
18 changes: 18 additions & 0 deletions lib/qr_code_generator/core_ext/core_extensions/core_extensions.rb
@@ -1,5 +1,23 @@
module QRCodeGenerator
# This module can be included on core classes such as String, Hash, Array,
# etc. to extend them with these convenience methods for generating
# QR Codes on them.
module CoreExtensions

# Converts this object to a QRCodeGenerator::QRCode instance that
# represents this object encoded as a QRCode.
#
# ====Parameters
#
# +options+::
# An optional Hash of options to affect the QR Code generation.
# See the QRCodeGenerator "QR Code Options" documentation for details.
#
# ====Returns
#
# A QRCodeGenerator::QRCode instance that represents this object
# encoded as a QRCode.
#
def to_qr(options = {})
QRCodeGenerator::QRCode.new(self, options)
end
Expand Down

0 comments on commit 8dd7b55

Please sign in to comment.