class SC::Builder::Handlebars
Public Instance Methods
build(dst_path)
click to toggle source
# File lib/sproutcore/builders/handlebars.rb, line 15 def build(dst_path) template_name = entry.rootname[/^.*\/([^\/]*)$/, 1] template_code = read(entry[:source_path]) replace_static_url(template_code) writelines dst_path, "SC.TEMPLATES[#{template_name.inspect}] = SC.Handlebars.compile(#{template_code.to_json});" end
sc_static_match()
click to toggle source
# File lib/sproutcore/builders/handlebars.rb, line 22 def sc_static_match /\{\{(sc_static|static_url|sc_target)\(\s*['"]([^"']*?)['"]\s*\)\}\}/ end
static_url(url='')
click to toggle source
# File lib/sproutcore/builders/handlebars.rb, line 26 def static_url(url='') url end