Class: CM::Sequence::Default
- Inherits:
-
Object
- Object
- CM::Sequence::Default
- Defined in:
- lib/CM/sequence/default.rb
Instance Method Summary collapse
-
#forward(operation) ⇒ Object
—————————————————————————– Operations.
-
#normalize(reload) ⇒ Object
—————————————————————————– Plugin interface.
-
#reverse(operation) ⇒ Object
—.
Instance Method Details
#forward(operation) ⇒ Object
Operations
23 24 25 26 27 28 29 30 31 |
# File 'lib/CM/sequence/default.rb', line 23 def forward(operation) super do |success| resources.each do |resource| success = false unless resource.execute(operation) break if plan.trap && plan.step end success end end |
#normalize(reload) ⇒ Object
Plugin interface
9 10 11 12 |
# File 'lib/CM/sequence/default.rb', line 9 def normalize(reload) super yield if block_given? end |
#reverse(operation) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/CM/sequence/default.rb', line 35 def reverse(operation) super do |success| resources.reverse.each do |resource| success = false unless resource.execute(operation) break if plan.trap && plan.step end success end end |