Class: Build::Files::FileTime

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/build/files/state.rb

Overview

Represents a specific file on disk with a specific mtime.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, time) ⇒ FileTime

Returns a new instance of FileTime.



31
32
33
34
# File 'lib/build/files/state.rb', line 31

def initialize(path, time)
	@path = path
	@time = time
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



36
37
38
# File 'lib/build/files/state.rb', line 36

def path
  @path
end

#timeObject (readonly)

Returns the value of attribute time.



37
38
39
# File 'lib/build/files/state.rb', line 37

def time
  @time
end

Instance Method Details

#<=>(other) ⇒ Object



39
40
41
# File 'lib/build/files/state.rb', line 39

def <=> other
	@time <=> other.time
end

#inspectObject



43
44
45
# File 'lib/build/files/state.rb', line 43

def inspect
	"<FileTime #{@path.inspect} #{@time.inspect}>"
end