Class: Capistrano::Deploy::Dependencies
- Inherits:
-
Object
- Object
- Capistrano::Deploy::Dependencies
- Includes:
- Enumerable
- Defined in:
- lib/alpha_omega/deploy/dependencies.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Instance Method Summary collapse
- #check {|_self| ... } ⇒ Object
- #each ⇒ Object
-
#initialize(configuration) {|_self| ... } ⇒ Dependencies
constructor
A new instance of Dependencies.
- #local ⇒ Object
- #pass? ⇒ Boolean
- #remote ⇒ Object
Constructor Details
#initialize(configuration) {|_self| ... } ⇒ Dependencies
Returns a new instance of Dependencies.
11 12 13 14 15 |
# File 'lib/alpha_omega/deploy/dependencies.rb', line 11 def initialize(configuration) @configuration = configuration @dependencies = [] yield self if block_given? end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
9 10 11 |
# File 'lib/alpha_omega/deploy/dependencies.rb', line 9 def configuration @configuration end |
Instance Method Details
#check {|_self| ... } ⇒ Object
17 18 19 20 |
# File 'lib/alpha_omega/deploy/dependencies.rb', line 17 def check yield self self end |
#each ⇒ Object
34 35 36 37 |
# File 'lib/alpha_omega/deploy/dependencies.rb', line 34 def each @dependencies.each { |d| yield d } self end |
#local ⇒ Object
28 29 30 31 32 |
# File 'lib/alpha_omega/deploy/dependencies.rb', line 28 def local dep = LocalDependency.new(configuration) @dependencies << dep dep end |
#pass? ⇒ Boolean
39 40 41 |
# File 'lib/alpha_omega/deploy/dependencies.rb', line 39 def pass? all? { |d| d.pass? } end |
#remote ⇒ Object
22 23 24 25 26 |
# File 'lib/alpha_omega/deploy/dependencies.rb', line 22 def remote dep = RemoteDependency.new(configuration) @dependencies << dep dep end |