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.



207
208
209
210
# File 'lib/fog/kubevirt/compute/compute.rb', line 207

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

Instance Method Details

#eachObject



212
213
214
215
216
# File 'lib/fog/kubevirt/compute/compute.rb', line 212

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

#finishObject



218
219
220
# File 'lib/fog/kubevirt/compute/compute.rb', line 218

def finish
  @watch.finish
end