Permalink
Browse files

Dict example uses Winner to be more explicit, less confusing

  • Loading branch information...
1 parent 612cd48 commit 07ddff43dc7449b4d12d40793f7123af0b8aa7e1 @defunkt defunkt committed Oct 11, 2009
Showing with 9 additions and 9 deletions.
  1. +9 −9 README.md
View
@@ -169,20 +169,20 @@ Dict-Style Views
----------------
ctemplate and friends want you to hand a dictionary to the template
-processor. Naturally Mustache supports a similar concept. Feel free
-to mix the class-based and this more procedural style at your leisure.
+processor. Mustache supports a similar concept. Feel free to mix the
+class-based and this more procedural style at your leisure.
-Given this template (dict.html):
+Given this template (winner.html):
Hello {{name}}
You have just won ${{value}}!
We can fill in the values at will:
- dict = Dict.new
- dict[:name] = 'George'
- dict[:value] = 100
- dict.render
+ view = Winner.new
+ view[:name] = 'George'
+ view[:value] = 100
+ view.render
Which returns:
@@ -191,8 +191,8 @@ Which returns:
We can re-use the same object, too:
- dict[:name] = 'Tony'
- dict.render
+ view[:name] = 'Tony'
+ view.render
Hello Tony
You have just won $100!

0 comments on commit 07ddff4

Please sign in to comment.