変数の展開 {{name}}のように2つのブレースで囲ったタグは、nameという名前のキーの値でおきかえられます。 対応するキーが見つからなかった場合はデフォルトでは空文字になります。 Mustache.render("Hello, {{world}}!", world: "mustache") # => "Hello, mustache!" Mustache.render("{{no_such_key}}") # => ""
変数の展開 {{name}}のように2つのブレースで囲ったタグは、nameという名前のキーの値でおきかえられます。 対応するキーが見つからなかった場合はデフォルトでは空文字になります。 Mustache.render("Hello, {{world}}!", world: "mustache") # => "Hello, mustache!" Mustache.render("{{no_such_key}}") # => ""
Inspired by ctemplate and et, Mustache is a framework-agnostic way to render logic-free views. As ctemplates says, "It emphasizes separating logic from presentation: it is impossible to embed application logic in this template language." For a list of implementations (other than Ruby) and tips, see http://mustache.github.io/. Think of Mustache as a replacement for your views. Instead of views cons
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く