Sha256: 9aab4587655d15c66982e1cba214aa4f8902cfe56b8aca45e3eafdf1b0ab8a1e

Contents?: true

Size: 641 Bytes

Versions: 6

Compression:

Stored size: 641 Bytes

Contents

module Nanoc::Int::ProcessingActions
  class Snapshot < Nanoc::Int::ProcessingAction
    # snapshot :before_layout
    # snapshot :before_layout, final: true
    # snapshot :before_layout, path: '/about.md'

    attr_reader :snapshot_name
    attr_reader :final
    attr_reader :path
    alias final? final

    def initialize(snapshot_name, final, path)
      @snapshot_name = snapshot_name
      @final = final
      @path = path
    end

    def serialize
      [:snapshot, @snapshot_name, @final, @path]
    end

    def to_s
      "snapshot #{@snapshot_name.inspect}, final: #{@final.inspect}, path: #{@path.inspect}"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nanoc-4.4.5 lib/nanoc/base/entities/processing_actions/snapshot.rb
nanoc-4.4.4 lib/nanoc/base/entities/processing_actions/snapshot.rb
nanoc-4.4.3 lib/nanoc/base/entities/processing_actions/snapshot.rb
nanoc-4.4.2 lib/nanoc/base/entities/processing_actions/snapshot.rb
nanoc-4.4.1 lib/nanoc/base/entities/processing_actions/snapshot.rb
nanoc-4.4.0 lib/nanoc/base/entities/processing_actions/snapshot.rb