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.
206 207 208 209 |
# File 'lib/fog/kubevirt/compute/compute.rb', line 206 def initialize(watch, mapper) @watch = watch @mapper = mapper end |
Instance Method Details
#each ⇒ Object
211 212 213 214 215 |
# File 'lib/fog/kubevirt/compute/compute.rb', line 211 def each @watch.each do |notice| yield @mapper.call(notice) end end |
#finish ⇒ Object
217 218 219 |
# File 'lib/fog/kubevirt/compute/compute.rb', line 217 def finish @watch.finish end |