Skip to content

Instantly share code, notes, and snippets.

@mipmip
Created January 7, 2016 17:30
Show Gist options
  • Save mipmip/79e3cb6d7df7560349a9 to your computer and use it in GitHub Desktop.
Save mipmip/79e3cb6d7df7560349a9 to your computer and use it in GitHub Desktop.
RubyMotion & GRMustache Trivial Example
{{ name }}
{{{ name }}}
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