Sha256: 2e89a316e08587ae7138a0ce6a8d30f7ef21d172852b0e8812570adcb8316870

Contents?: true

Size: 651 Bytes

Versions: 6

Compression:

Stored size: 651 Bytes

Contents

module Nanoc::Int::RuleMemoryActions
  class Snapshot < Nanoc::Int::RuleMemoryAction
    # 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_method :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.1.1 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.0 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.0rc2 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.0rc1 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.0b1 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.0a1 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb