Class: Fog::Kubevirt::Compute::Real::WatchWrapper
- Inherits:
-
Object
- Object
- Fog::Kubevirt::Compute::Real::WatchWrapper
- Defined in:
- lib/fog/kubevirt/compute/compute.rb
Instance Method Summary collapse
- #each ⇒ Object
- #finish ⇒ Object
-
#initialize(watch, mapper) ⇒ WatchWrapper
constructor
A new instance of WatchWrapper.
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
#each ⇒ Object
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 |
#finish ⇒ Object
244 245 246 |
# File 'lib/fog/kubevirt/compute/compute.rb', line 244 def finish @watch.finish end |