Class: Nanoc::Core::CompilerLoader Private

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/core/compiler_loader.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#compiled_content_cache_classObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



39
40
41
# File 'lib/nanoc/core/compiler_loader.rb', line 39

def compiled_content_cache_class
  Nanoc::Core::CompiledContentCache
end

#load(site, focus: nil, action_provider: nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/nanoc/core/compiler_loader.rb', line 7

def load(site, focus: nil, action_provider: nil)
  action_sequence_store = Nanoc::Core::ActionSequenceStore.new(config: site.config)

  dependency_store =
    Nanoc::Core::DependencyStore.new(site.items, site.layouts, site.config)

  objects = site.items.to_a + site.layouts.to_a + site.code_snippets + [site.config]

  checksum_store =
    Nanoc::Core::ChecksumStore.new(config: site.config, objects:)

  action_provider ||= Nanoc::Core::ActionProvider.named(site.config.action_provider).for(site)

  outdatedness_store =
    Nanoc::Core::OutdatednessStore.new(config: site.config)

  compiled_content_cache =
    compiled_content_cache_class.new(config: site.config)

  params = {
    compiled_content_cache:,
    checksum_store:,
    action_sequence_store:,
    dependency_store:,
    action_provider:,
    outdatedness_store:,
    focus:,
  }

  Nanoc::Core::Compiler.new(site, **params)
end