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 = nil) ⇒ File

Returns a new instance of File.



4
5
6
# File 'lib/hearken/indexing/file.rb', line 4

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

Instance Method Details

#timestampObject



8
9
10
# File 'lib/hearken/indexing/file.rb', line 8

def timestamp
  @path.mtime.to_i.to_s
end

#to_sObject



12
13
14
# File 'lib/hearken/indexing/file.rb', line 12

def to_s
  @path.to_s
end