Class: Opal::ERB::Processor

Inherits:
Processor show all
Defined in:
opal/lib/opal/sprockets/erb.rb

Instance Method Summary collapse

Methods inherited from Processor

cache_key, #process_required_trees, #process_requires, reset_cache_key!, #sprockets_extnames_regexp, sprockets_extnames_regexp, stub_file, stubbed_files

Methods inherited from TiltTemplate

compiler_options, #compiler_options, engine_initialized?, inherited, #prepare, version

Instance Method Details

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


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

def evaluate(context, locals, &block)
  compiler = Opal::ERB::Compiler.new(@data, context.logical_path.sub(/#{REGEXP_START}templates\//, ''))
  @data = compiler.prepared_source
  super
end

#initialize_engineObject


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

def initialize_engine
  super
  require_template_library 'opal/erb'
end