Skip to content
Browse files

updated docstring of register-converters

  • Loading branch information...
1 parent ea9e643 commit 4424bfe898f55fb00a50b85bbf8cd717b419b195 @ngrunwald committed Nov 20, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/gavagai/core.clj
10 src/gavagai/core.clj
@@ -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)
@@ -195,7 +196,12 @@
(false by default)
- [\"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]

0 comments on commit 4424bfe

Please sign in to comment.
Something went wrong with that request. Please try again.