Sha256: 27dce2b536070eac633f40ab2e184f81e3fc79fcd1cfe5220e0b993ed40e5c27
Contents?: true
Size: 624 Bytes
Versions: 9
Compression:
Stored size: 624 Bytes
Contents
module Nanoc::Int::ProcessingActions class Snapshot < Nanoc::Int::ProcessingAction # snapshot :before_layout # snapshot :before_layout, path: '/about.md' attr_reader :snapshot_name attr_reader :path def initialize(snapshot_name, path) @snapshot_name = snapshot_name @path = path end def serialize [:snapshot, @snapshot_name, true, @path] end NONE = Object.new def copy(path: NONE) self.class.new(@snapshot_name, path.equal?(NONE) ? @path : path) end def to_s "snapshot #{@snapshot_name.inspect}, path: #{@path.inspect}" end end end
Version data entries
9 entries across 9 versions & 1 rubygems