Class: Confinement::Compiler
- Inherits:
-
Object
- Object
- Confinement::Compiler
- Defined in:
- lib/confinement.rb
Instance Attribute Summary collapse
-
#site ⇒ Object
readonly
Returns the value of attribute site.
Instance Method Summary collapse
- #compile_everything ⇒ Object
-
#initialize(site) ⇒ Compiler
constructor
A new instance of Compiler.
Constructor Details
#initialize(site) ⇒ Compiler
Returns a new instance of Compiler.
518 519 520 521 |
# File 'lib/confinement.rb', line 518 def initialize(site) @site = site @lock = Mutex.new end |
Instance Attribute Details
#site ⇒ Object (readonly)
Returns the value of attribute site.
523 524 525 |
# File 'lib/confinement.rb', line 523 def site @site end |
Instance Method Details
#compile_everything ⇒ Object
525 526 527 528 529 530 531 532 533 |
# File 'lib/confinement.rb', line 525 def compile_everything # All compilation happens inside the same lock. So we shouldn't have # to worry about deadlocks or anything @lock.synchronize do # Assets first since it's almost always a dependency of contents compile_assets(site.asset_blobs.send(:lookup)) compile_contents(site.route_identifiers.send(:lookup).values) end end |