Class: Hearken::Indexing::File

Inherits:
Object
  • Object
show all
Defined in:
lib/hearken/indexing/file.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, root) ⇒ File

Returns a new instance of File.



2
3
4
# File 'lib/hearken/indexing/file.rb', line 2

def initialize path, root
  @path, @root = path, root
end

Instance Method Details

#timestampObject



6
7
8
# File 'lib/hearken/indexing/file.rb', line 6

def timestamp
  @path.mtime.to_i.to_s
end

#to_sObject



10
11
12
# File 'lib/hearken/indexing/file.rb', line 10

def to_s
  @path.to_s
end