Class: Propshaft::Compiler

Inherits:
Object
  • Object
show all
Defined in:
lib/propshaft/compiler.rb

Overview

Base compiler from which other compilers can inherit

Direct Known Subclasses

CssAssetUrls, JsAssetUrls, SourceMappingUrls

Defined Under Namespace

Classes: CssAssetUrls, JsAssetUrls, SourceMappingUrls

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(assembly) ⇒ Compiler

Returns a new instance of Compiler.



8
9
10
# File 'lib/propshaft/compiler.rb', line 8

def initialize(assembly)
  @assembly = assembly
end

Instance Attribute Details

#assemblyObject (readonly)

Returns the value of attribute assembly.



5
6
7
# File 'lib/propshaft/compiler.rb', line 5

def assembly
  @assembly
end

Instance Method Details

#compile(asset, input) ⇒ Object

Override this in a specific compiler

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/propshaft/compiler.rb', line 13

def compile(asset, input)
  raise NotImplementedError
end

#referenced_by(asset) ⇒ Object



17
18
19
# File 'lib/propshaft/compiler.rb', line 17

def referenced_by(asset)
  Set.new
end