From 8a393a4929c92095e97fba1799fc520694c6f1f3 Mon Sep 17 00:00:00 2001 From: Wincent Colaiuta Date: Thu, 29 Jul 2010 19:22:29 +0200 Subject: [PATCH] Documentation tweaks to work better with YARD Signed-off-by: Wincent Colaiuta --- doc/README | 2 +- ext/mkdtemp.c | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/doc/README b/doc/README index 1b4d93b..fec333a 100644 --- a/doc/README +++ b/doc/README @@ -1,4 +1,4 @@ -See Dir.mkdtemp for usage information. +See {Dir.mkdtemp} for usage information. = Links diff --git a/ext/mkdtemp.c b/ext/mkdtemp.c index d7e6c5e..b17b6c7 100644 --- a/ext/mkdtemp.c +++ b/ext/mkdtemp.c @@ -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. + * 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. * - * If supplied a block, performs a Dir.chdir into the created directory and - * yields to the block: + * If supplied a block, performs a Dir.chdir 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 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". + * + * @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) { -- 2.37.1