Class: Minestrone::Deploy::LocalDependency

Inherits:
Object
  • Object
show all
Defined in:
lib/minestrone/recipes/deploy/local_dependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ LocalDependency

Returns a new instance of LocalDependency.



9
10
11
12
# File 'lib/minestrone/recipes/deploy/local_dependency.rb', line 9

def initialize(configuration)
  @configuration = configuration
  @success = true
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



6
7
8
# File 'lib/minestrone/recipes/deploy/local_dependency.rb', line 6

def configuration
  @configuration
end

#messageObject (readonly)

Returns the value of attribute message.



7
8
9
# File 'lib/minestrone/recipes/deploy/local_dependency.rb', line 7

def message
  @message
end

Instance Method Details

#command(command) ⇒ Object



14
15
16
17
18
# File 'lib/minestrone/recipes/deploy/local_dependency.rb', line 14

def command(command)
  @message ||= "`#{command}' could not be found in the path on the local host"
  @success = find_in_path(command)
  self
end

#or(message) ⇒ Object



20
21
22
23
# File 'lib/minestrone/recipes/deploy/local_dependency.rb', line 20

def or(message)
  @message = message
  self
end

#pass?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/minestrone/recipes/deploy/local_dependency.rb', line 25

def pass?
  @success
end