Class: S3Archive::LocalFile
- Inherits:
-
Struct
- Object
- Struct
- S3Archive::LocalFile
- Includes:
- Logging
- Defined in:
- lib/s3archive/s3_file_synchronizer.rb
Overview
Just a wrapper around a path with some md5 functions
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
Methods included from Logging
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path
39 40 41 |
# File 'lib/s3archive/s3_file_synchronizer.rb', line 39 def path @path end |
Instance Method Details
#md5 ⇒ Object
54 55 56 |
# File 'lib/s3archive/s3_file_synchronizer.rb', line 54 def md5 @md5 ||= Digest::MD5.file(path) end |
#md5_base64 ⇒ Object
50 51 52 |
# File 'lib/s3archive/s3_file_synchronizer.rb', line 50 def md5_base64 md5.base64digest end |
#md5_hex ⇒ Object
46 47 48 |
# File 'lib/s3archive/s3_file_synchronizer.rb', line 46 def md5_hex md5.hexdigest end |
#open(*args, &block) ⇒ Object
42 43 44 |
# File 'lib/s3archive/s3_file_synchronizer.rb', line 42 def open(*args, &block) File.open(path, *args, &block) end |
#to_s ⇒ Object
58 59 60 |
# File 'lib/s3archive/s3_file_synchronizer.rb', line 58 def to_s path end |