Class: Mclone::Volume::TaskSet
- Defined in:
- lib/mclone.rb
Overview
Volume-bound set of tasks belonging to the specific volume
Instance Method Summary collapse
-
#<<(task) ⇒ Object
Accept only the tasks referencing the volume as either source or destination.
-
#initialize(volume) ⇒ TaskSet
constructor
A new instance of TaskSet.
Methods inherited from TaskSet
Methods inherited from ObjectSet
#>>, #[], #commit!, #each, #each_id, #empty?, #eql?, #hash, #id, #merge!, #modified?, #object, #resolve, #size
Constructor Details
#initialize(volume) ⇒ TaskSet
Returns a new instance of TaskSet.
464 465 466 467 |
# File 'lib/mclone.rb', line 464 def initialize(volume) @volume = volume super() end |
Instance Method Details
#<<(task) ⇒ Object
Accept only the tasks referencing the volume as either source or destination
470 471 472 |
# File 'lib/mclone.rb', line 470 def <<(task) task.source_id == @volume.id || task.destination_id == @volume.id ? super : task end |