Permalink
Browse files

Add french and english doc about wlang in README.

  • Loading branch information...
1 parent 31155b5 commit 4334871c24f373d4a8ad1f249d34e72cfdd7858b @blambeau blambeau committed Jun 12, 2012
Showing with 19 additions and 0 deletions.
  1. +10 −0 README.fr.rdoc
  2. +9 −0 README.rdoc
View
@@ -561,6 +561,16 @@ pour décorer l'objet retourné.
var resource = {"foo":"bar","baz":"qux"}; present(resource);
+=== Templates WLang
+
+Dependency:: {wlang}[https://github.com/blambeau/wlang/]
+File Extensions:: <tt>.wlang</tt>
+Example:: <tt>wlang :index, :locals => { :key => 'value' }</tt>
+
+L'appel de code ruby au sein des templates n'est pas idiomatique en wlang. L'écriture de
+templates sans logique est encouragé, via le passage de variables locales. Il est néanmoins
+possible d'écrire un +layout+ en wlang et d'y utiliser +yield+.
+
=== Templates embarqués
get '/' do
View
@@ -529,6 +529,15 @@ The <tt>:callback</tt> and <tt>:variable</tt> options can be used to decorate th
var resource = {"foo":"bar","baz":"qux"}; present(resource);
+=== WLang Templates
+
+Dependency:: {wlang}[https://github.com/blambeau/wlang/]
+File Extensions:: <tt>.wlang</tt>
+Example:: <tt>wlang :index, :locals => { :key => 'value' }</tt>
+
+Since calling ruby methods is not idiomatic in wlang, you almost always want to pass locals
+to it. Layouts written in wlang and +yield+ are supported, though.
+
=== Embedded Templates
get '/' do

0 comments on commit 4334871

Please sign in to comment.