Class: Sequence

Inherits:
Screwcap::Base show all
Defined in:
lib/screwcap/sequence.rb

Instance Method Summary collapse

Methods inherited from Screwcap::Base

#clone_from, #set

Constructor Details

#initialize(opts = {}) ⇒ Sequence

A Sequence will run a set of tasks in order.

task_for :do_this, :server => :myserver
  ...
end

task_for :do_that, :server => :myserver
  ...
end

task_for :do_the_other_thing, :server => :myserver
  ...
end

sequence :do_them_all, :tasks => [:do_this, :do_that, :do_the_other_thing]

Sequences can be called just like tasks.

Options

  • :tasks - the list of tasks to run, as an array of symbols.



22
23
24
25
26
27
# File 'lib/screwcap/sequence.rb', line 22

def initialize(opts = {})
  super
  self.__options = opts
  self.__name = opts[:name]
  self.__task_names = opts[:tasks]
end