Class: Opal::Slim::Processor

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.engine_initialized?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/opal/slim.rb', line 27

def self.engine_initialized?
  true
end

Instance Method Details

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



38
39
40
41
# File 'lib/opal/slim.rb', line 38

def evaluate context, locals, &block
  context.require_asset 'opal-slim'
  Opal::Slim.compile data, context.logical_path.sub(/^templates\//, '')
end

#initialize_engineObject



31
32
33
# File 'lib/opal/slim.rb', line 31

def initialize_engine
  require_template_library 'opal'
end

#prepareObject



35
36
# File 'lib/opal/slim.rb', line 35

def prepare
end