Class: Opal::ERB::Processor

Inherits:
Tilt::Template
  • Object
show all
Defined in:
opal/lib/opal/sprockets/erb.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.engine_initialized?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'opal/lib/opal/sprockets/erb.rb', line 12

def self.engine_initialized?
  true
end

.versionObject



16
17
18
# File 'opal/lib/opal/sprockets/erb.rb', line 16

def self.version
  ::Opal::VERSION
end

Instance Method Details

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



29
30
31
32
# File 'opal/lib/opal/sprockets/erb.rb', line 29

def evaluate(context, locals, &block)
  context.require_asset 'erb'
  Opal::ERB.compile data, context.logical_path.sub(/^templates\//, '')
end

#initialize_engineObject



20
21
22
# File 'opal/lib/opal/sprockets/erb.rb', line 20

def initialize_engine
  require_template_library 'opal'
end

#prepareObject



24
25
# File 'opal/lib/opal/sprockets/erb.rb', line 24

def prepare
end