Skip to content

Commit e40f649

Browse files
committed
Small tweaks in the documentation.
1 parent 2536373 commit e40f649

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/mate/io.cljc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
(defn- resource-path
77
"Returns the path of a resource.
88
9-
If the resource name starts with a './', the path is built using
10-
the parent directory of the namespace from which this macro is invoked."
9+
If `resource-name` starts with a './', the path is built
10+
using the parent directory of `namespace-obj`."
1111
[namespace-obj resource-name]
1212
(if (str/starts-with? resource-name "./")
1313
(let [namespace-str (name (ns-name namespace-obj))
@@ -34,12 +34,13 @@
3434
resource-content (slurp resource)]
3535
(apply f resource-content args))))
3636

37-
#_(inline-resource* *ns* "./test-resource.txt" identity)
37+
#_(inline-resource* *ns* "./test-resource.txt")
3838
#_(inline-resource* *ns* "./test-resource.txt" str/upper-case)
3939

4040
#?(:clj
4141
(defmacro inline-resource
42-
"Inlines the content of a resource at 'macro expansion' time."
42+
"Inlines the content of a resource at \"macro expansion\" time,
43+
optionally transformed by `f & args` in the same way that using `clojure.core/update`."
4344
([resource-name]
4445
(inline-resource* *ns* (eval resource-name)))
4546
([resource-name f & args]

0 commit comments

Comments
 (0)