Class: Opal::Slim::SlimProcessor

Inherits:
BuilderProcessors::RubyProcessor
  • Object
show all
Defined in:
lib/opal/slim.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ SlimProcessor

Returns a new instance of SlimProcessor.



47
48
49
50
# File 'lib/opal/slim.rb', line 47

def initialize *args
  super
  @source = prepare(@source, @filename)
end

Instance Method Details

#prepare(source, path) ⇒ Object



56
57
58
59
# File 'lib/opal/slim.rb', line 56

def prepare source, path
  slim = ::Opal::Slim.compiled_slim(source)
  ::Opal::Slim.wrap(slim, path)
end

#requiresObject



52
53
54
# File 'lib/opal/slim.rb', line 52

def requires
  ['opal-slim', 'erb'] + super
end