Class: MultiSync::RemoteResource
- Inherits:
-
Resource
- Object
- Resource
- MultiSync::RemoteResource
show all
- Defined in:
- lib/multi_sync/resources/remote_resource.rb
Constant Summary
Constants inherited
from Resource
MultiSync::Resource::AWS_ATTRIBUTES
Instance Method Summary
collapse
Methods inherited from Resource
#<=>, #==, #hash, #matching_etag?
#class_name
Instance Method Details
#body ⇒ Object
7
8
9
|
# File 'lib/multi_sync/resources/remote_resource.rb', line 7
def body
file.body
end
|
#determine_content_length ⇒ Object
25
26
27
|
# File 'lib/multi_sync/resources/remote_resource.rb', line 25
def determine_content_length
file.content_length
end
|
#determine_content_type ⇒ Object
21
22
23
|
# File 'lib/multi_sync/resources/remote_resource.rb', line 21
def determine_content_type
file.content_type
end
|
#determine_etag ⇒ Object
11
12
13
14
15
|
# File 'lib/multi_sync/resources/remote_resource.rb', line 11
def determine_etag
file.etag
rescue NoMethodError
Digest::MD5.hexdigest(File.read(path_with_root))
end
|
#determine_mtime ⇒ Object
17
18
19
|
# File 'lib/multi_sync/resources/remote_resource.rb', line 17
def determine_mtime
file.last_modified
end
|