Class: Opal::Haml::HamlProcessor
- Inherits:
-
BuilderProcessors::RubyProcessor
- Object
- BuilderProcessors::RubyProcessor
- Opal::Haml::HamlProcessor
- Defined in:
- lib/opal/haml/builder.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ HamlProcessor
constructor
A new instance of HamlProcessor.
- #prepare(source, path) ⇒ Object
- #requires ⇒ Object
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 |
#requires ⇒ Object
14 15 16 |
# File 'lib/opal/haml/builder.rb', line 14 def requires ['opal-haml'] + super end |