Class: Opal::TiltTemplate
- Inherits:
- 
      Tilt::Template
      
        - Object
- Tilt::Template
- Opal::TiltTemplate
 
- Defined in:
- opal/lib/tilt/opal.rb
Direct Known Subclasses
Class Method Summary collapse
- .compiler_options ⇒ Object
- .engine_initialized? ⇒ Boolean
- .inherited(subclass) ⇒ Object
- .version ⇒ Object
Instance Method Summary collapse
- #compiler_options ⇒ Object
- #evaluate(_, _, &block) ⇒ Object
- #initialize_engine ⇒ Object
- #prepare ⇒ Object
Class Method Details
.compiler_options ⇒ Object
| 24 25 26 | # File 'opal/lib/tilt/opal.rb', line 24 def self. Opal::Config..merge(requirable: true) end | 
.engine_initialized? ⇒ Boolean
| 16 17 18 | # File 'opal/lib/tilt/opal.rb', line 16 def self.engine_initialized? true end | 
.inherited(subclass) ⇒ Object
| 12 13 14 | # File 'opal/lib/tilt/opal.rb', line 12 def self.inherited(subclass) subclass.default_mime_type = 'application/javascript' end | 
Instance Method Details
#compiler_options ⇒ Object
| 47 48 49 | # File 'opal/lib/tilt/opal.rb', line 47 def self.class. end | 
#evaluate(_, _, &block) ⇒ Object
| 35 36 37 38 39 40 41 42 43 44 45 | # File 'opal/lib/tilt/opal.rb', line 35 def evaluate(_, _, &block) if builder = @options[:builder] builder.dup.build(file).to_s elsif @options[:build] Opal::Builder.build(file).to_s else = ( || {}).merge!(file: file) compiler = Compiler.new(data, ) compiler.compile.to_s end end | 
#initialize_engine ⇒ Object
| 28 29 30 | # File 'opal/lib/tilt/opal.rb', line 28 def initialize_engine require_template_library 'opal' end | 
#prepare ⇒ Object
| 32 33 | # File 'opal/lib/tilt/opal.rb', line 32 def prepare end |