From 7a3241465576fb9910ed58fb7330670d174b1745 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Mon, 23 Feb 2009 20:35:49 -0600 Subject: [PATCH] More PDoc additions. --- src/lang/array.js | 6 +----- src/lang/range.js | 7 +++++-- src/lang/string.js | 2 +- src/lang/template.js | 5 ++++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/lang/array.js b/src/lang/array.js index 5144aa1..7f2ac7d 100644 --- a/src/lang/array.js +++ b/src/lang/array.js @@ -250,11 +250,7 @@ Array.from = $A; return (n < 0) ? n : i - n - 1; } - /** - * Array#concat(args...) -> Array - * - * TODO: Array#concat - **/ + // Replaces a built-in function. No PDoc needed. function concat() { var array = slice.call(this, 0), item; for (var i = 0, length = arguments.length; i < length; i++) { diff --git a/src/lang/range.js b/src/lang/range.js index 36501e1..63e4539 100644 --- a/src/lang/range.js +++ b/src/lang/range.js @@ -6,7 +6,7 @@ * $R(start, end[, exclusive = false]) -> ObjectRange * * Creates a new ObjectRange object. - * This method is a convenience wrapper around the ObjectRange constructor, + * This method is a convenience wrapper around the [[ObjectRange]] constructor, * but $R is the preferred alias. **/ function $R(start, end, exclusive) { @@ -17,7 +17,10 @@ var ObjectRange = Class.create(Enumerable, (function() { /** * new ObjectRange(start, end[, exclusive = false]) * - * TODO: new ObjectRange + * Creates a new `ObjectRange`. + * + * The `exclusive` argument specifies whether `end` itself is a part of the + * range. **/ function initialize(start, end, exclusive) { this.start = start; diff --git a/src/lang/string.js b/src/lang/string.js index 89c89e9..cafd92a 100644 --- a/src/lang/string.js +++ b/src/lang/string.js @@ -5,7 +5,7 @@ Object.extend(String, { /** * String.interpret(value) -> String * - * TODO: String.interpret + * Coerces `value` into a string. Returns an empty string for `null`. **/ interpret: function(value) { return value == null ? '' : String(value); diff --git a/src/lang/template.js b/src/lang/template.js index 6e8b743..f3a4320 100644 --- a/src/lang/template.js +++ b/src/lang/template.js @@ -5,7 +5,10 @@ var Template = Class.create({ /** * new Template(template[, pattern = Template.Pattern]) * - * TODO: new Template + * Creates a Template object. + * + * The optional `pattern` argument expects a `RegExp` that defines a custom + * syntax for the replaceable symbols in `template`. **/ initialize: function(template, pattern) { this.template = template.toString();