Module: Eye::Dsl::Chain

Included in:
ApplicationOpts, GroupOpts
Defined in:
lib/eye/dsl/chain.rb

Instance Method Summary collapse

Instance Method Details

#chain(opts = {}) ⇒ Object


3
4
5
6
7
8
9
10
# File 'lib/eye/dsl/chain.rb', line 3

def chain(opts = {})
  acts = Array(opts[:action] || opts[:actions] || [:start, :restart])

  acts.each do |act|
    @config[:chain] ||= {}
    @config[:chain][act] = opts.merge(:action => act)
  end
end