Class: Build::Files::State::FileTime
- Inherits:
-
Object
- Object
- Build::Files::State::FileTime
- Includes:
- Comparable
- Defined in:
- lib/build/files/state.rb
Overview
Represents a specific file on disk with a specific mtime.
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(path, time) ⇒ FileTime
constructor
A new instance of FileTime.
- #inspect ⇒ Object
Constructor Details
#initialize(path, time) ⇒ FileTime
Returns a new instance of FileTime.
20 21 22 23 |
# File 'lib/build/files/state.rb', line 20 def initialize(path, time) @path = path @time = time end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
25 26 27 |
# File 'lib/build/files/state.rb', line 25 def path @path end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
26 27 28 |
# File 'lib/build/files/state.rb', line 26 def time @time end |
Instance Method Details
#<=>(other) ⇒ Object
28 29 30 |
# File 'lib/build/files/state.rb', line 28 def <=> other @time <=> other.time end |
#inspect ⇒ Object
32 33 34 |
# File 'lib/build/files/state.rb', line 32 def inspect "<FileTime #{@path.inspect} #{@time.inspect}>" end |