Class: Opal::BuilderProcessors::ERBProcessor

Inherits:
Processor
  • Object
show all
Defined in:
opal/lib/opal/builder_processors.rb

Instance Attribute Summary

Attributes inherited from Processor

#filename, #options, #required_trees, #requires

Instance Method Summary collapse

Methods inherited from Processor

extensions, handles, #initialize, #mark_as_required, match?, match_regexp, #source_map, #to_s

Constructor Details

This class inherits a constructor from Opal::BuilderProcessors::Processor

Instance Method Details

#sourceObject



145
146
147
148
# File 'opal/lib/opal/builder_processors.rb', line 145

def source
  result = ::ERB.new(@source.to_s).result
  "Opal.modules[#{@filename.inspect}] = function() {#{result}};"
end