Class: S3diff::LocalFile

Inherits:
Object
  • Object
show all
Defined in:
lib/s3diff/local_file.rb

Instance Method Summary collapse

Constructor Details

#initialize(file_path) ⇒ LocalFile

Returns a new instance of LocalFile.



5
6
7
# File 'lib/s3diff/local_file.rb', line 5

def initialize(file_path)
  @file_path = file_path
end

Instance Method Details

#etagObject



9
10
11
# File 'lib/s3diff/local_file.rb', line 9

def etag
  Digest::MD5.file(@file_path).to_s
end

#pathObject



17
18
19
# File 'lib/s3diff/local_file.rb', line 17

def path
  @file_path
end

#sizeObject



13
14
15
# File 'lib/s3diff/local_file.rb', line 13

def size
  File.size(@file_path)
end