Skip to content

Commit

Permalink
updated docstring of register-converters
Browse files Browse the repository at this point in the history
  • Loading branch information
ngrunwald committed Nov 20, 2012
1 parent ea9e643 commit 4424bfe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/gavagai/core.clj
Expand Up @@ -183,7 +183,8 @@
base default))

(defmacro register-converters
"Registers a converter for a given Java class given as a String
"Registers a converter for a given Java class given as a String. Takes an optional map
as a first argument defining default options. Individual option maps are merged with defaults.
Optional arguments
- :only (vector) -> only translate these methods
- :exclude (vector) -> exclude the methods from translation (keywords or patterns)
Expand All @@ -195,7 +196,12 @@
(false by default)
Example
(register-converters
[\"java.util.Date\" :exclude [:class] :add {:string str} :lazy? false])"
[\"java.util.Date\" :exclude [:class] :add {:string str} :lazy? false])
is equivalebnt to:
(register-converters
{:exclude [:class] :lazy? false}
[\"java.util.Date\" :add {:string str}])"
[default & conv-defs]
(let [[full-conv-defs default-opts] (if (map? default)
[conv-defs default]
Expand Down

0 comments on commit 4424bfe

Please sign in to comment.