class Requirejs::Tilt::Template
Public Instance Methods
evaluate(scope, locals, &block)
click to toggle source
Internal: Compile the template Stylus using this instance options. The current ‘scope’ and given ‘locals’ are ignored and the output is cached.
Returns a String with the compiled stylesheet with CSS syntax.
# File lib/requirejs/tilt/template.rb, line 24 def evaluate(scope, locals, &block) if ::Requirejs::BuildConfig.new(file).exists? compiler = ::Requirejs::Compiler.new(scope: scope, data: data, file: file) @output ||= compiler.exec else @output ||= data end end
prepare()
click to toggle source
# File lib/requirejs/tilt/template.rb, line 16 def prepare end