Sha256: edc0b63f0f714438ac5a78d5d59b8d5c24d6224f56e0a0c3feee460c282c6f7a
Contents?: true
Size: 616 Bytes
Versions: 4
Compression:
Stored size: 616 Bytes
Contents
# frozen_string_literal: true module Nanoc::RuleDSL class CompilationRule < Rule include Nanoc::Core::ContractsSupport contract Nanoc::Core::ItemRep, C::KeywordArgs[ site: Nanoc::Core::Site, recorder: Nanoc::RuleDSL::ActionRecorder, view_context: Nanoc::Core::ViewContextForPreCompilation, ] => C::Any 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 end end
Version data entries
4 entries across 4 versions & 1 rubygems