Class: Nanoc::Int::RuleMemoryActions::Snapshot
- Inherits:
-
Nanoc::Int::RuleMemoryAction
- Object
- Nanoc::Int::RuleMemoryAction
- Nanoc::Int::RuleMemoryActions::Snapshot
- Defined in:
- lib/nanoc/base/entities/rule_memory_actions/snapshot.rb
Instance Attribute Summary collapse
-
#final ⇒ Object
(also: #final?)
readonly
Returns the value of attribute final.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#snapshot_name ⇒ Object
readonly
snapshot :before_layout snapshot :before_layout, final: true snapshot :before_layout, path: ‘/about.md’.
Instance Method Summary collapse
-
#initialize(snapshot_name, final, path) ⇒ Snapshot
constructor
A new instance of Snapshot.
-
#serialize ⇒ Object
-
#to_s ⇒ Object
Methods inherited from Nanoc::Int::RuleMemoryAction
Constructor Details
#initialize(snapshot_name, final, path) ⇒ Snapshot
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
#final ⇒ Object (readonly) Also known as: final?
Returns the value of attribute final
8 9 10 |
# File 'lib/nanoc/base/entities/rule_memory_actions/snapshot.rb', line 8 def final @final end |
#path ⇒ Object (readonly)
Returns the value of attribute path
9 10 11 |
# File 'lib/nanoc/base/entities/rule_memory_actions/snapshot.rb', line 9 def path @path end |
#snapshot_name ⇒ Object (readonly)
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
#serialize ⇒ Object
18 19 20 |
# File 'lib/nanoc/base/entities/rule_memory_actions/snapshot.rb', line 18 def serialize [:snapshot, @snapshot_name, @final, @path] end |
#to_s ⇒ Object
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 |