Skip to content

Commit 328f340

Browse files
committed
A number of minor documentation fixes
1 parent 68b4707 commit 328f340

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

src/io/aviso/ansi.clj

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22
"Help with generating textual output that includes ANSI escape codes for formatting."
33
(:require [clojure.string :as str]))
44

5-
;; control sequence initiator: ESC [
6-
(def ^:const csi "\u001b[")
5+
(def ^:const csi
6+
"The control sequence initiator: ESC ["
7+
"\u001b[")
78

89
;; select graphic rendition
9-
(def ^:const sgr "m")
10+
(def ^:const sgr
11+
"The Select Graphic Rendition suffix: m"
12+
"m")
1013

11-
(def ^:const ^{:doc "Resets the font, clearing bold, italic, color, and background color."}
12-
reset-font (str csi sgr))
14+
(def ^:const
15+
reset-font
16+
"Resets the font, clearing bold, italic, color, and background color."
17+
(str csi sgr))
1318

1419
(defn ^:private def-sgr-const
1520
"Utility for defining a font-modifying constant."

src/io/aviso/binary.clj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
(defprotocol BinaryData
99
"Allows various data sources to be treated as a byte-array data type that
10-
supports a length and random access to individual bytes."
10+
supports a length and random access to individual bytes.
11+
12+
BinaryData is extended onto byte arrays, onto String, and onto nil."
1113

1214
(data-length [this] "The total number of bytes available.")
1315
(byte-at [this index] "The byte value at a specific offset."))
@@ -127,8 +129,8 @@
127129
When one side is shorter than the other, it is padded with -- placeholders to make this
128130
more clearly visible.
129131
130-
expected - ByteData
131-
actual - ByteData
132+
expected - BinaryData
133+
actual - BinaryData
132134
133135
Display 16 bytes (from each data set) per line."
134136
[expected actual]

src/io/aviso/writer.clj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"The Writer protocol is used as the target of any written output.")
33

44
(defprotocol Writer
5-
"May receive strings, which are printed, or stored."
5+
"May receive strings, which are printed, or stored.
6+
7+
Writer is extended onto java.lang.Appendable, a common interface implemented by both PrintWriter and StringBuilder (among
8+
many others)"
69

710
(write-string [this string] "Writes the string to the Writer."))
811

@@ -26,7 +29,7 @@
2629

2730
(defn writeln
2831
"Constructs a string from the values (with no seperator) and writes the string to the Writer,
29-
followed by a end-of-line terminator."
32+
followed by an end-of-line terminator."
3033
([writer]
3134
(write-string writer endline))
3235
([writer & values]
@@ -39,7 +42,9 @@
3942
(write-string writer (apply format fmt values)))
4043

4144
(defn into-string
42-
"Creates a StringBuilder and passes that as the first parameter to the function, along with the other parameters."
45+
"Creates a StringBuilder and passes that as the first parameter to the function, along with the other parameters.
46+
47+
Returns the value of the StringBuilder after invoking the function."
4348
[f & params]
4449
(let [sb (StringBuilder. 2000)]
4550
(apply f sb params)

0 commit comments

Comments
 (0)