Class: Sequence
- Inherits:
-
Screwcap::Base
- Object
- OpenStruct
- Screwcap::Base
- Sequence
- Defined in:
- lib/screwcap/sequence.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Sequence
constructor
A Sequence will run a set of tasks in order.
Methods inherited from Screwcap::Base
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. = opts self.__name = opts[:name] self.__task_names = opts[:tasks] end |