Class: CephStorage::StorageObject::RadosStorageObjectEnumerator
- Inherits:
-
CephRuby::RadosObjectEnumerator
- Object
- CephRuby::RadosObjectEnumerator
- CephStorage::StorageObject::RadosStorageObjectEnumerator
- Extended by:
- RadosWrapper
- Defined in:
- lib/ceph_storage/storage_object/rados_storage_object_enumerator.rb
Overview
Wrapper for RadosObjectEnumerator
Instance Attribute Summary collapse
-
#pool_factory ⇒ Object
Returns the value of attribute pool_factory.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(pool_factory) {|_self| ... } ⇒ RadosStorageObjectEnumerator
constructor
A new instance of RadosStorageObjectEnumerator.
- #log(message) ⇒ Object
Methods included from RadosWrapper
Constructor Details
#initialize(pool_factory) {|_self| ... } ⇒ RadosStorageObjectEnumerator
Returns a new instance of RadosStorageObjectEnumerator.
10 11 12 13 14 |
# File 'lib/ceph_storage/storage_object/rados_storage_object_enumerator.rb', line 10 def initialize(pool_factory) self.pool_factory = pool_factory super(nil) yield self if block_given? end |
Instance Attribute Details
#pool_factory ⇒ Object
Returns the value of attribute pool_factory.
6 7 8 |
# File 'lib/ceph_storage/storage_object/rados_storage_object_enumerator.rb', line 6 def pool_factory @pool_factory end |
Instance Method Details
#each ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/ceph_storage/storage_object/rados_storage_object_enumerator.rb', line 16 def each return enum_for(:each) unless block_given? super do |rados_object| yield pool_factory.storage_object(rados_object.name) end end |
#log(message) ⇒ Object
24 25 26 |
# File 'lib/ceph_storage/storage_object/rados_storage_object_enumerator.rb', line 24 def log() CephStorage.log("RadosStorageObjectEnumerator #{message}") end |