Class: Nanoc::Core::CompilationStages::LoadStores

Inherits:
Nanoc::Core::CompilationStage show all
Includes:
Nanoc::Core::ContractsSupport
Defined in:
lib/nanoc/core/compilation_stages/load_stores.rb

Instance Method Summary collapse

Methods included from Nanoc::Core::ContractsSupport

enabled?, included, setup_once, warn_about_performance

Methods inherited from Nanoc::Core::CompilationStage

#call

Constructor Details

#initialize(checksum_store:, compiled_content_cache:, dependency_store:, action_sequence_store:, outdatedness_store:) ⇒ LoadStores

Returns a new instance of LoadStores.



9
10
11
12
13
14
15
# File 'lib/nanoc/core/compilation_stages/load_stores.rb', line 9

def initialize(checksum_store:, compiled_content_cache:, dependency_store:, action_sequence_store:, outdatedness_store:)
  @checksum_store = checksum_store
  @compiled_content_cache = compiled_content_cache
  @dependency_store = dependency_store
  @action_sequence_store = action_sequence_store
  @outdatedness_store = outdatedness_store
end

Instance Method Details

#load_store(store) ⇒ Object



27
28
29
30
31
# File 'lib/nanoc/core/compilation_stages/load_stores.rb', line 27

def load_store(store)
  Nanoc::Core::Instrumentor.call(:store_loaded, store.class) do
    store.load
  end
end

#runObject



18
19
20
21
22
23
24
# File 'lib/nanoc/core/compilation_stages/load_stores.rb', line 18

def run
  load_store(@checksum_store)
  load_store(@compiled_content_cache)
  load_store(@dependency_store)
  load_store(@action_sequence_store)
  load_store(@outdatedness_store)
end