lib/nanoc/base/compilation/compiler.rb
# Creates the representations of all items as defined by the compilation
# rules.
#
# @api private
Creates the representations of all items as defined by the compilation
rules.
Creates the representations of all items as defined by the compilation rules .
def build_reps
      items.each do |item|
        matching_rules = rules_collection.item_compilation_rules_for(item)
        raise Nanoc::Errors::NoMatchingCompilationRuleFound.new(item) if matching_rules.empty?
        rep_names = matching_rules.map { |r| r.rep_name }.uniq
        rep_names.each do |rep_name|
          item.reps << ItemRep.new(item, rep_name)
        end
      end
    end
def build_reps items . each do | item | matching_rules = rules_collection . item_compilation_rules_for ( item ) raise Nanoc :: Errors :: NoMatchingCompilationRuleFound . new ( item ) if matching_rules . empty? rep_names = matching_rules . map { | r | r . rep_name } . uniq rep_names . each do | rep_name | item . reps << ItemRep . new ( item , rep_name ) end end end
Creates the representations of all items as defined by the compilation
rules.
Creates the representations of all items as defined by the compilation rules .
# Find matching rules # Create reps
api
None