Class: Nanoc::Core::Assertions::AllItemRepsHaveCompiledContent

Inherits:
Base
  • Object
show all
Includes:
ContractsSupport
Defined in:
lib/nanoc/core/assertions.rb

Instance Method Summary collapse

Methods included from ContractsSupport

enabled?, included, setup_once, warn_about_performance

Constructor Details

#initialize(compiled_content_cache:, item_reps:) ⇒ AllItemRepsHaveCompiledContent

Returns a new instance of AllItemRepsHaveCompiledContent.



29
30
31
32
# File 'lib/nanoc/core/assertions.rb', line 29

def initialize(compiled_content_cache:, item_reps:)
  @compiled_content_cache = compiled_content_cache
  @item_reps = item_reps
end

Instance Method Details

#callObject



35
36
37
38
39
# File 'lib/nanoc/core/assertions.rb', line 35

def call
  @item_reps.all? do |rep|
    @compiled_content_cache[rep]
  end
end