From 323e7ec1f5fa87cb2e2a0e31f99bd37d19080191 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Thu, 24 Jul 2014 21:37:43 -0400 Subject: [PATCH] Some quick documentation --- lib/squib/api/image.rb | 1 + lib/squib/api/units.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/squib/api/image.rb b/lib/squib/api/image.rb index 3cd687e..4ce34ae 100644 --- a/lib/squib/api/image.rb +++ b/lib/squib/api/image.rb @@ -27,6 +27,7 @@ module Squib # @param y: the y-coordinate to place # @param width: the pixel width that the image should scale to. SVG scaling is done with vectors, so the scaling should be smooth. When set to `:native`, uses the DPI and units of the loaded SVG document. # @param height: the pixel width that the image should scale to. SVG scaling is done with vectors, so the scaling should be smooth. When set to `:native`, uses the DPI and units of the loaded SVG document. + # @return [nil] # @api public def svg(range: :all, file: nil, id: nil, x: 0, y: 0, width: :native, height: :native) range = rangeify(range) diff --git a/lib/squib/api/units.rb b/lib/squib/api/units.rb index 3d6de16..5d566a5 100644 --- a/lib/squib/api/units.rb +++ b/lib/squib/api/units.rb @@ -2,7 +2,8 @@ module Squib class Deck # Given inches, returns the number of pixels according to the deck's DPI. - # + # + # @example inches(2.5) # 750px for 300 dpi # @param [Decimal] n, the number of inches # @return [Decimal] the number of pixels, according to the deck's DPI # @api public