Class: Opal::Builder::Processor::OpalERBProcessor
- Inherits:
-
RubyProcessor
- Object
- Opal::Builder::Processor
- RubyProcessor
- Opal::Builder::Processor::OpalERBProcessor
- Defined in:
- opal/lib/opal/builder/processor.rb
Overview
This handler is for files named ".opalerb", which ought to first get compiled to Ruby code using ERB, then with Opal. Unlike below processors, OpalERBProcessor can be used to compile templates, which will in turn output HTML. Take a look at docs/templates.md to understand this subsystem better.
Instance Attribute Summary
Attributes inherited from Opal::Builder::Processor
#abs_path, #autoloads, #filename, #options, #required_trees, #source
Instance Method Summary collapse
-
#initialize(*args) ⇒ OpalERBProcessor
constructor
A new instance of OpalERBProcessor.
- #requires ⇒ Object
Methods inherited from RubyProcessor
#autoloads, #cache_key, #compiled, #compiler_for, match?, #required_trees, #source, #source_map
Methods inherited from Opal::Builder::Processor
handles, #mark_as_required, match?, match_regexp, #to_s
Constructor Details
#initialize(*args) ⇒ OpalERBProcessor
Returns a new instance of OpalERBProcessor.
130 131 132 133 |
# File 'opal/lib/opal/builder/processor.rb', line 130 def initialize(*args) super @source = prepare(@source, @filename) end |
Instance Method Details
#requires ⇒ Object
135 136 137 |
# File 'opal/lib/opal/builder/processor.rb', line 135 def requires ['erb'] + super end |