Class: Cmpi::CMPIContext

Inherits:
Object
  • Object
show all
Defined in:
lib/cmpi.rb,
ext/cmpi-bindings/cmpi_wrap.c

Overview

Proxy of C Cmpi::CMPIContext struct

Instance Method Summary collapse

Instance Method Details

#[](at) ⇒ Object



292
293
294
295
296
297
298
# File 'lib/cmpi.rb', line 292

def [] at
  if at.kind_of? Integer
	get_entry_at( at )
  else
	get_entry( at.to_s )
  end
end

#countObject



287
288
289
290
291
# File 'lib/cmpi.rb', line 287

def count
  #can't use alias here because CMPIContext::get_entry_count is only defined after
  # initializing the provider (swig init code)
  get_entry_count
end

#eachObject



299
300
301
302
303
# File 'lib/cmpi.rb', line 299

def each
  0.upto(self.count-1) do |i|
	yield get_entry_at(i)
  end
end