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)


10
11
12
# File 'opal/lib/opal/sprockets/erb.rb', line 10

def self.engine_initialized?
  true
end

.versionObject



14
15
16
# File 'opal/lib/opal/sprockets/erb.rb', line 14

def self.version
  ::Opal::VERSION
end

Instance Method Details

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



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

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

#initialize_engineObject



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

def initialize_engine
  require_template_library 'opal'
  require_template_library 'opal/erb'
end

#prepareObject



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

def prepare
end