Class: Opal::Haml::HamlProcessor

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ HamlProcessor

Returns a new instance of HamlProcessor.



8
9
10
11
12
# File 'lib/opal/haml/builder.rb', line 8

def initialize(*args)
  super
  @filename = ::Opal::Compiler.module_name(@filename)
  @source = prepare(@source, @filename)
end

Instance Method Details

#prepare(source, path) ⇒ Object



18
19
20
# File 'lib/opal/haml/builder.rb', line 18

def prepare(source, path)
  ::Opal::Haml.compile_haml(source, path)
end

#requiresObject



14
15
16
# File 'lib/opal/haml/builder.rb', line 14

def requires
  ['opal-haml'] + super
end