lib/nanoc/base/compilation/rules_collection.rb
def compilation_rule_for(rep)
      @item_compilation_rules.find do |rule|
        rule.applicable_to?(rep.item) && rule.rep_name == rep.name
      end
    end
# Finds the first matching compilation rule for the given item
# representation.
#
# @param [Nanoc::ItemRep] rep The item rep for which to fetch the rule
#
# @return [Nanoc::Rule, nil] The compilation rule for the given item rep,
#   or nil if no rules have been found
Finds the first matching compilation rule for the given item
representation.
Finds the first matching compilation rule for the given item representation .
def compilation_rule_for(rep)
      @item_compilation_rules.find do |rule|
        rule.applicable_to?(rep.item) && rule.rep_name == rep.name
      end
    end
def compilation_rule_for ( rep ) @item_compilation_rules . find do | rule | rule . applicable_to? ( rep . item ) && rule . rep_name == rep . name end end
Finds the first matching compilation rule for the given item
representation.
Finds the first matching compilation rule for the given item representation .
The compilation rule for the given item rep, or nil if no rules have been found
The compilation rule for the given item rep or nil if no rules have been found
Nanoc::Rule, nil
rep
rep The item rep for which to fetch the rule
rep The item rep for which to fetch the rule