Class: Fog::Kubevirt::Compute::Real::WatchWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/kubevirt/compute/compute.rb

Instance Method Summary collapse

Constructor Details

#initialize(watch, mapper) ⇒ WatchWrapper

Returns a new instance of WatchWrapper.



233
234
235
236
# File 'lib/fog/kubevirt/compute/compute.rb', line 233

def initialize(watch, mapper)
  @watch = watch
  @mapper = mapper
end

Instance Method Details

#eachObject



238
239
240
241
242
# File 'lib/fog/kubevirt/compute/compute.rb', line 238

def each
  @watch.each do |notice|
    yield @mapper.call(notice)
  end
end

#finishObject



244
245
246
# File 'lib/fog/kubevirt/compute/compute.rb', line 244

def finish
  @watch.finish
end