lib/nanoc/base/compilation/rule.rb in nanoc-3.7.4 vs lib/nanoc/base/compilation/rule.rb in nanoc-3.7.5
- old
+ new
@@ -1,12 +1,10 @@
# encoding: utf-8
module Nanoc
-
# Contains the processing information for a item.
class Rule
-
# @return [Regexp] The regex that determines which items this rule can be
# applied to. This rule can be applied to items with a identifier
# matching this regex.
attr_reader :identifier_regex
@@ -65,11 +63,9 @@
def apply_to(rep, params = {})
compiler = params.fetch(:compiler) do
raise ArgumentError, 'Required :compiler option is missing'
end
rep = Nanoc::ItemRepProxy.new(rep, compiler) unless rep.proxy?
- Nanoc::RuleContext.new(:rep => rep, :compiler => compiler).instance_eval(&@block)
+ Nanoc::RuleContext.new(rep: rep, compiler: compiler).instance_eval(&@block)
end
-
end
-
end