Class: Cell::Erb::Template

Inherits:
Tilt::Template
  • Object
show all
Defined in:
lib/cell/erb/template.rb

Overview

Erbse-Tilt binding. This should be bundled with tilt. # 1.4. OR should be tilt-erbse.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.engine_initialized?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/cell/erb/template.rb', line 47

def self.engine_initialized?
  defined? ::Erbse::Engine
end

Instance Method Details

#initialize_engineObject



51
52
53
# File 'lib/cell/erb/template.rb', line 51

def initialize_engine
  require_template_library "erbse"
end

#precompiled_template(locals) ⇒ Object



59
60
61
62
# File 'lib/cell/erb/template.rb', line 59

def precompiled_template(locals)
  # puts @template.call(data)
  @template.call(data)
end

#prepareObject



55
56
57
# File 'lib/cell/erb/template.rb', line 55

def prepare
  @template = ::Erbse::Engine.new # we also have #options here.
end