Class: Bosh::Director::DeploymentPlan::SkipDrain
- Defined in:
- lib/bosh/director/deployment_plan/options/skip_drain.rb
Instance Method Summary collapse
- #for_job(job_name) ⇒ Object
-
#initialize(param) ⇒ SkipDrain
constructor
A new instance of SkipDrain.
Constructor Details
#initialize(param) ⇒ SkipDrain
Returns a new instance of SkipDrain.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/bosh/director/deployment_plan/options/skip_drain.rb', line 4 def initialize(param) @jobs = [] @all = false if param == '*' @all = true elsif param.is_a?(String) && !param.empty? @jobs = param.split(',') end end |
Instance Method Details
#for_job(job_name) ⇒ Object
15 16 17 |
# File 'lib/bosh/director/deployment_plan/options/skip_drain.rb', line 15 def for_job(job_name) @all || @jobs.include?(job_name) end |