Class: Nanoc::Int::RuleMemoryActions::Snapshot Private

Inherits:
Nanoc::Int::RuleMemoryAction show all
Defined in:
lib/nanoc/base/entities/rule_memory_actions/snapshot.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Nanoc::Int::RuleMemoryAction

#inspect

Constructor Details

#initialize(snapshot_name, final, path) ⇒ Snapshot

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Snapshot.



12
13
14
15
16
# File 'lib/nanoc/base/entities/rule_memory_actions/snapshot.rb', line 12

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

Instance Attribute Details

#finalObject (readonly) Also known as: final?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/nanoc/base/entities/rule_memory_actions/snapshot.rb', line 8

def final
  @final
end

#pathObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
# File 'lib/nanoc/base/entities/rule_memory_actions/snapshot.rb', line 9

def path
  @path
end

#snapshot_nameObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

snapshot :before_layout snapshot :before_layout, final: true snapshot :before_layout, path: ‘/about.md’



7
8
9
# File 'lib/nanoc/base/entities/rule_memory_actions/snapshot.rb', line 7

def snapshot_name
  @snapshot_name
end

Instance Method Details

#serializeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/nanoc/base/entities/rule_memory_actions/snapshot.rb', line 18

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

#to_sObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



22
23
24
# File 'lib/nanoc/base/entities/rule_memory_actions/snapshot.rb', line 22

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