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.



200
201
202
203
# File 'lib/fog/kubevirt/compute/compute.rb', line 200

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

Instance Method Details

#eachObject



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

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

#finishObject



211
212
213
# File 'lib/fog/kubevirt/compute/compute.rb', line 211

def finish
  @watch.finish
end