Class: Nanoc::Core::ProcessingActions::Snapshot
Instance Attribute Summary collapse
Instance Method Summary
collapse
enabled?, included, setup_once, warn_about_performance
#inspect
Constructor Details
#initialize(snapshot_names, paths) ⇒ Snapshot
Returns a new instance of Snapshot.
16
17
18
19
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 16
def initialize(snapshot_names, paths)
@snapshot_names = snapshot_names
@paths = paths
end
|
Instance Attribute Details
#paths ⇒ Object
Returns the value of attribute paths.
13
14
15
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 13
def paths
@paths
end
|
#snapshot_names ⇒ Object
Returns the value of attribute snapshot_names.
12
13
14
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 12
def snapshot_names
@snapshot_names
end
|
Instance Method Details
#==(other) ⇒ Object
40
41
42
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 40
def ==(other)
self.class == other.class && snapshot_names == other.snapshot_names && paths == other.paths
end
|
#eql?(other) ⇒ Boolean
44
45
46
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 44
def eql?(other)
self == other
end
|
#hash ⇒ Object
36
37
38
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 36
def hash
[self.class, snapshot_names, paths].hash
end
|
#serialize ⇒ Object
22
23
24
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 22
def serialize
[:snapshot, @snapshot_names, true, @paths]
end
|
#to_s ⇒ Object
32
33
34
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 32
def to_s
"snapshot #{@snapshot_names.inspect}, paths: #{@paths.inspect}"
end
|
#update(snapshot_names: [], paths: []) ⇒ Object
27
28
29
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 27
def update(snapshot_names: [], paths: [])
self.class.new(@snapshot_names + snapshot_names.to_a, @paths + paths.to_a)
end
|