Class: CephStorage::StorageObject::RadosStorageObjectEnumerator

Inherits:
CephRuby::RadosObjectEnumerator
  • Object
show all
Extended by:
RadosWrapper
Defined in:
lib/ceph_storage/storage_object/rados_storage_object_enumerator.rb

Overview

Wrapper for RadosObjectEnumerator

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RadosWrapper

wrap_me

Constructor Details

#initialize(pool_factory) {|_self| ... } ⇒ RadosStorageObjectEnumerator

Returns a new instance of RadosStorageObjectEnumerator.

Yields:

  • (_self)

Yield Parameters:



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_factoryObject

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

#eachObject



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(message)
  CephStorage.log("RadosStorageObjectEnumerator #{message}")
end