Class: Capistrano::Deploy::Dependencies

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/alpha_omega/deploy/dependencies.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration) {|_self| ... } ⇒ Dependencies

Returns a new instance of Dependencies.

Yields:

  • (_self)

Yield Parameters:



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

#configurationObject (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

Yields:

  • (_self)

Yield Parameters:



17
18
19
20
# File 'lib/alpha_omega/deploy/dependencies.rb', line 17

def check
  yield self
  self
end

#eachObject



34
35
36
37
# File 'lib/alpha_omega/deploy/dependencies.rb', line 34

def each
  @dependencies.each { |d| yield d }
  self
end

#localObject



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

Returns:

  • (Boolean)


39
40
41
# File 'lib/alpha_omega/deploy/dependencies.rb', line 39

def pass?
  all? { |d| d.pass? }
end

#remoteObject



22
23
24
25
26
# File 'lib/alpha_omega/deploy/dependencies.rb', line 22

def remote
  dep = RemoteDependency.new(configuration)
  @dependencies << dep
  dep
end