]> git.wincent.com - mkdtemp.git/commitdiff
Documentation tweaks to work better with YARD
authorWincent Colaiuta <win@wincent.com>
Thu, 29 Jul 2010 17:22:29 +0000 (19:22 +0200)
committerWincent Colaiuta <win@wincent.com>
Thu, 29 Jul 2010 17:22:29 +0000 (19:22 +0200)
Signed-off-by: Wincent Colaiuta <win@wincent.com>
doc/README
ext/mkdtemp.c

index 1b4d93b3332edf85da7ffc2a77b371984940201a..fec333a17e6dcc14455849f4bbba3b9c85350377 100644 (file)
@@ -1,4 +1,4 @@
-See Dir.mkdtemp for usage information.
+See {Dir.mkdtemp} for usage information.
 
 = Links
 
index d7e6c5e64b500eb019067dc1779aeca65bac1ea7..b17b6c7a18b8cc17e2849610f6cc4017b3827865 100644 (file)
@@ -45,13 +45,13 @@ VALUE yield_block(VALUE ignored, VALUE block)
  *     Dir.mkdtemp([string]) { ... } -> string
  *
  * This method securely creates temporary directories. It is a wrapper for the
- * mkdtemp() function in the standard C library. It takes an optional String
- * parameter as a template describing the desired form of the directory name
- * and overwriting the template in-place; if no template is supplied then
- * "/tmp/temp.XXXXXX" is used as a default.
+ * <code>mkdtemp()</code> function in the standard C library. It takes an
+ * optional String parameter as a template describing the desired form of the
+ * directory name and overwriting the template in-place; if no template is
+ * supplied then "/tmp/temp.XXXXXX" is used as a default.
  *
- * If supplied a block, performs a Dir.chdir into the created directory and
- * yields to the block:
+ * If supplied a block, performs a <code>Dir.chdir</code> into the created
+ * directory and yields to the block:
  *
  *      # this:            # is a shorthand for:
  *      Dir.mkdtemp do     #   dir = Dir.mkdtemp
@@ -59,11 +59,15 @@ VALUE yield_block(VALUE ignored, VALUE block)
  *      end                #     puts Dir.pwd
  *                         #   end
  *
- * Note that the exact implementation of mkdtemp() may vary depending on the
- * target system. For example, on Mac OS X at the time of writing, the man page
- * states that the template may contain "some number" of "Xs" on the end of the
- * string, whereas on Red Hat Enterprise Linux it states that the template
- * suffix "must be XXXXXX".
+ * Note that the exact implementation of <code>mkdtemp()</code> may vary
+ * depending on the target system. For example, on Mac OS X at the time of
+ * writing, the man page states that the template may contain "some number" of
+ * "Xs" on the end of the string, whereas on Red Hat Enterprise Linux it states
+ * that the template suffix "must be XXXXXX".
+ *
+ * @param [String] optional template string
+ * @return [String, nil] the filled-in template string, or nil in the event of
+ *   an error
  */
 static VALUE dir_mkdtemp_m(int argc, VALUE *argv, VALUE self)
 {