class Opal::BuilderProcessors::OpalERBProcessor
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.
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
Opal::BuilderProcessors::Processor::new
# File lib/opal/builder_processors.rb, line 128 def initialize(*args) super @source = prepare(@source, @filename) end
Public Instance Methods
requires()
click to toggle source
Calls superclass method
Opal::BuilderProcessors::RubyProcessor#requires
# File lib/opal/builder_processors.rb, line 133 def requires ['erb'] + super end
Private Instance Methods
prepare(source, path)
click to toggle source
# File lib/opal/builder_processors.rb, line 139 def prepare(source, path) ::Opal::ERB::Compiler.new(source, path).prepared_source end