Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add french and english doc about wlang in README.

  • Loading branch information...
commit 4334871c24f373d4a8ad1f249d34e72cfdd7858b 1 parent 31155b5
@blambeau authored
Showing with 19 additions and 0 deletions.
  1. +10 −0 README.fr.rdoc
  2. +9 −0 README.rdoc
View
10 README.fr.rdoc
@@ -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
9 README.rdoc
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.