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
Compare file times for ordering.
-
#initialize(path, time) ⇒ FileTime
constructor
Initialize a file time record.
-
#inspect ⇒ Object
Generate a string representation for debugging.
Constructor Details
#initialize(path, time) ⇒ FileTime
Initialize a file time record.
23 24 25 26 |
# File 'lib/build/files/state.rb', line 23 def initialize(path, time) @path = path @time = time end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
28 29 30 |
# File 'lib/build/files/state.rb', line 28 def path @path end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
29 30 31 |
# File 'lib/build/files/state.rb', line 29 def time @time end |
Instance Method Details
#<=>(other) ⇒ Object
Compare file times for ordering.
34 35 36 |
# File 'lib/build/files/state.rb', line 34 def <=> other @time <=> other.time end |
#inspect ⇒ Object
Generate a string representation for debugging.
40 41 42 |
# File 'lib/build/files/state.rb', line 40 def inspect "<FileTime #{@path.inspect} #{@time.inspect}>" end |