Class: Propshaft::Assembly
- Inherits:
-
Object
- Object
- Propshaft::Assembly
- Defined in:
- lib/propshaft/assembly.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #compilers ⇒ Object
-
#initialize(config) ⇒ Assembly
constructor
A new instance of Assembly.
- #load_path ⇒ Object
- #processor ⇒ Object
- #resolver ⇒ Object
- #server ⇒ Object
Constructor Details
#initialize(config) ⇒ Assembly
Returns a new instance of Assembly.
12 13 14 |
# File 'lib/propshaft/assembly.rb', line 12 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
10 11 12 |
# File 'lib/propshaft/assembly.rb', line 10 def config @config end |
Instance Method Details
#compilers ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/propshaft/assembly.rb', line 37 def compilers @compilers ||= Propshaft::Compilers.new(self).tap do |compilers| Array(config.compilers).each do |(mime_type, klass)| compilers.register mime_type, klass end end end |
#load_path ⇒ Object
16 17 18 |
# File 'lib/propshaft/assembly.rb', line 16 def load_path Propshaft::LoadPath.new(config.paths) end |
#processor ⇒ Object
32 33 34 35 |
# File 'lib/propshaft/assembly.rb', line 32 def processor Propshaft::Processor.new \ load_path: load_path, output_path: config.output_path, compilers: compilers end |