Class: Watchly::Snapshot
- Inherits:
-
Object
- Object
- Watchly::Snapshot
- Defined in:
- lib/watchly/snapshot.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#targets ⇒ Object
(also: #globs)
readonly
Returns the value of attribute targets.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #diff(other) ⇒ Object
-
#initialize(targets) ⇒ Snapshot
constructor
A new instance of Snapshot.
Constructor Details
#initialize(targets) ⇒ Snapshot
Returns a new instance of Snapshot.
6 7 8 9 |
# File 'lib/watchly/snapshot.rb', line 6 def initialize(targets) @targets = targets @files = capture(targets) end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
3 4 5 |
# File 'lib/watchly/snapshot.rb', line 3 def files @files end |
#targets ⇒ Object (readonly) Also known as: globs
Returns the value of attribute targets.
3 4 5 |
# File 'lib/watchly/snapshot.rb', line 3 def targets @targets end |
Instance Method Details
#==(other) ⇒ Object
19 20 21 22 23 |
# File 'lib/watchly/snapshot.rb', line 19 def ==(other) return false unless other.is_a? self.class files == other.files end |