Class: Nanoc::RuleDSL::CompilationRule Private
- Includes:
- Core::ContractsSupport
- Defined in:
- lib/nanoc/rule_dsl/compilation_rule.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 Attribute Summary
Attributes inherited from Rule
Instance Method Summary collapse
Methods inherited from Rule
#applicable_to?, #initialize, #matches
Constructor Details
This class inherits a constructor from Nanoc::RuleDSL::Rule
Instance Method Details
#apply_to(rep, site:, recorder:, view_context:) ⇒ 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.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/nanoc/rule_dsl/compilation_rule.rb', line 12 def apply_to(rep, site:, recorder:, view_context:) context = Nanoc::RuleDSL::CompilationRuleContext.new( rep:, recorder:, site:, view_context:, ) context.instance_exec(matches(rep.item.identifier), &@block) end |