Class: Quick::FS::ROCodeFile

Inherits:
Object
  • Object
show all
Defined in:
lib/quick/fs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ ROCodeFile

Returns a new instance of ROCodeFile.



52
53
54
# File 'lib/quick/fs.rb', line 52

def initialize(source)
	@source = source
end

Instance Attribute Details

#ctimeObject

Returns the value of attribute ctime.



50
51
52
# File 'lib/quick/fs.rb', line 50

def ctime
  @ctime
end

#mtimeObject

Returns the value of attribute mtime.



50
51
52
# File 'lib/quick/fs.rb', line 50

def mtime
  @mtime
end

#sourceObject

Returns the value of attribute source.



50
51
52
# File 'lib/quick/fs.rb', line 50

def source
  @source
end

Instance Method Details

#read_file(path) ⇒ Object



65
66
67
68
# File 'lib/quick/fs.rb', line 65

def read_file(path)
	@atime = Time.now
	@source
end

#size(path) ⇒ Object



61
62
63
# File 'lib/quick/fs.rb', line 61

def size(path)
	@source.bytesize
end

#times(path) ⇒ Object



56
57
58
59
# File 'lib/quick/fs.rb', line 56

def times(path)
	now = Time.now
	[@atime ||= now, @mtime ||= now, @ctime ||= now]
end