Class: NgClassify::Template

Inherits:
Tilt::Template
  • Object
show all
Defined in:
lib/ng_classify.rb

Instance Method Summary collapse

Instance Method Details

#evaluate(scope, locals, &block) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/ng_classify.rb', line 39

def evaluate(scope, locals, &block)
  options = {
    appName: NgClassify.appName,
    prefix: NgClassify.prefix,
    animation: NgClassify.animation,
    constant: NgClassify.constant,
    controller: NgClassify.controller,
    directive: NgClassify.directive,
    factory: NgClassify.factory,
    filter: NgClassify.filter,
    provider: NgClassify.provider,
    service: NgClassify.service,
    value: NgClassify.value
  }
  env = CommonJS::Environment.new(V8::Context.new, :path => File.expand_path(File.join('..'), __FILE__))
  env.require('ng-classify-commonjs.js').call(data, options)
end

#prepareObject

need this or it will throw NotImplementedError



36
37
# File 'lib/ng_classify.rb', line 36

def prepare # need this or it will throw NotImplementedError
end