lib/nanoc/base/entities/item_rep.rb in nanoc-4.5.4 vs lib/nanoc/base/entities/item_rep.rb in nanoc-4.6.0

- old
+ new

@@ -42,9 +42,14 @@ # Reset flags @compiled = false end + contract Symbol => C::Bool + def snapshot?(name) + snapshot_defs.any? { |sd| sd.name == name } + end + contract C::KeywordArgs[snapshot: C::Optional[Symbol]] => C::Maybe[String] # Returns the item rep’s raw path. It includes the path to the output # directory and the full filename. # # @param [Symbol] snapshot The snapshot for which the path should be