Commits

Anonymous committed 8bbad8c

update README with 0.2 API
bump version in pom.xml

Comments (0)

Files changed (2)

       (:use org.bituf.clj-stringtemplate))
 
 
+## Create empty view template
+
+    (create-view)
+
+This creates an empty view template, which is not very useful by itself. You
+can reset the template using reset-view! (described below).
+
+
+## Create view template from specified string parameter
+
+    (create-view "hello $adjective$ world")
+
+The snippet above will create a view template using the specified string
+"hello $adjective$ world".
+
+
 ## Load view template from classpath
 
     (get-view-from-classpath "hello")
 template.
 
 
+## Reset view template using specified string template
+
+    (let [view (create-view "hello")]
+      ...
+      (reset-view! view "hello $adjective$ world")
+      ...
+      (fill-view! view "name" "Henry")
+      ...)
+
+The snippet above first creates a view template, then resets it with another
+template.
+
+
 ## Populate view template with attribute/values
 
     (let [view (get-view-from-classpath "hello")]
   <groupId>org.bituf</groupId>
   <artifactId>clj-stringtemplate</artifactId>
   <packaging>jar</packaging>
-  <version>0.2-SNAPSHOT</version>
+  <version>0.2</version>
   <name>clj-stringtemplate</name>
   <description>Clj-Stringtemplate is a Clojure wrapper for the StringTemplate Java library</description>
   <url>http://code.google.com/p/bitumenframework/</url>