Class: CephStorage::StorageObject::URLStorageObject
- Inherits:
-
Object
- Object
- CephStorage::StorageObject::URLStorageObject
show all
- Includes:
- CephStorage::StorageObject
- Defined in:
- lib/ceph_storage/storage_object/url_storage_object.rb
Overview
Remote URL Storage Object
Instance Attribute Summary collapse
Instance Method Summary
collapse
#copy, #copy_xattrs, #log, #move, supports_xattr?, #xattr_supported?
Constructor Details
Returns a new instance of URLStorageObject.
9
10
11
|
# File 'lib/ceph_storage/storage_object/url_storage_object.rb', line 9
def initialize(url)
self.name = url
end
|
Instance Attribute Details
#url ⇒ Object
Returns the value of attribute url.
7
8
9
|
# File 'lib/ceph_storage/storage_object/url_storage_object.rb', line 7
def url
@url
end
|
Instance Method Details
#destroy ⇒ Object
29
30
31
|
# File 'lib/ceph_storage/storage_object/url_storage_object.rb', line 29
def destroy
raise 'Unsupported file operation'
end
|
#name ⇒ Object
13
14
15
|
# File 'lib/ceph_storage/storage_object/url_storage_object.rb', line 13
def name
url
end
|
#path ⇒ Object
17
18
19
|
# File 'lib/ceph_storage/storage_object/url_storage_object.rb', line 17
def path
url
end
|
#read_file ⇒ Object
21
22
23
|
# File 'lib/ceph_storage/storage_object/url_storage_object.rb', line 21
def read_file
open(url).read
end
|
#write_file(_contents) ⇒ Object
25
26
27
|
# File 'lib/ceph_storage/storage_object/url_storage_object.rb', line 25
def write_file(_contents)
raise 'Unsupported file operation'
end
|