Created
January 7, 2016 17:30
-
-
Save mipmip/79e3cb6d7df7560349a9 to your computer and use it in GitHub Desktop.
RubyMotion & GRMustache Trivial Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ name }} | |
{{{ name }}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def render | |
nameRenderingObject = GRMustacheRendering.renderingObjectWithBlock( lambda do | tag, context, htmlsafe, error | | |
return "Arthur & Cie" | |
end) | |
data = { "name" => nameRenderingObject } | |
rendering = GRMustacheTemplate.renderObject(data, fromResource:"Document", bundle:nil, error:nil) | |
p rendering | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment