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
20
21
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 16
def initialize(snapshot_names, paths)
super()
@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
47
48
49
50
51
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 47
def ==(other)
self.class == other.class &&
snapshot_names == other.snapshot_names &&
paths == other.paths
end
|
#eql?(other) ⇒ Boolean
53
54
55
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 53
def eql?(other)
self == other
end
|
#hash ⇒ Object
43
44
45
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 43
def hash
[self.class, snapshot_names, paths].hash
end
|
#serialize ⇒ Object
24
25
26
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 24
def serialize
[:snapshot, @snapshot_names, true, @paths]
end
|
#to_s ⇒ Object
39
40
41
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 39
def to_s
"snapshot #{@snapshot_names.inspect}, paths: #{@paths.inspect}"
end
|
#update(snapshot_names: [], paths: []) ⇒ Object
31
32
33
34
35
36
|
# File 'lib/nanoc/core/processing_actions/snapshot.rb', line 31
def update(snapshot_names: [], paths: [])
self.class.new(
@snapshot_names + snapshot_names.to_a,
@paths + paths.to_a,
)
end
|