Class: Capistrano::Command::Tree::ConditionBranch
- Defined in:
- lib/capistrano/command.rb
Defined Under Namespace
Classes: Evaluator
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#configuration ⇒ Object
Returns the value of attribute configuration.
Attributes inherited from Branch
Instance Method Summary collapse
-
#initialize(configuration, condition, command, options, callback) ⇒ ConditionBranch
constructor
A new instance of ConditionBranch.
- #match(server) ⇒ Object
- #to_s ⇒ Object
Methods inherited from Branch
Constructor Details
#initialize(configuration, condition, command, options, callback) ⇒ ConditionBranch
Returns a new instance of ConditionBranch.
82 83 84 85 86 |
# File 'lib/capistrano/command.rb', line 82 def initialize(configuration, condition, command, , callback) @configuration = configuration @condition = condition super(command, , callback) end |
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
52 53 54 |
# File 'lib/capistrano/command.rb', line 52 def condition @condition end |
#configuration ⇒ Object
Returns the value of attribute configuration.
51 52 53 |
# File 'lib/capistrano/command.rb', line 51 def configuration @configuration end |
Instance Method Details
#match(server) ⇒ Object
88 89 90 |
# File 'lib/capistrano/command.rb', line 88 def match(server) Evaluator.new(configuration, condition, server).result end |
#to_s ⇒ Object
92 93 94 |
# File 'lib/capistrano/command.rb', line 92 def to_s "#{condition.inspect} :: #{command.inspect}" end |