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



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

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

Instance Method Details

#prepare(source, path) ⇒ Object



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

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

#requiresObject



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

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