Sha256: 7bc6da2f2217f0b3a6133b1dcd21e24ce9e4da4a1d416f254dc551ba0a13232e

Contents?: true

Size: 641 Bytes

Versions: 20

Compression:

Stored size: 641 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 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

20 entries across 20 versions & 1 rubygems

Version Path
nanoc-4.3.8 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.3.7 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.3.6 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.3.5 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.3.4 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.3.3 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.3.2 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.3.1 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.3.0 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.2.4 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.2.3 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.2.2 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.2.1 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.2.0 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.6 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.2.0b1 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.5 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.4 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.3 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
nanoc-4.1.2 lib/nanoc/base/entities/rule_memory_actions/snapshot.rb