Class: Brut::CLI::Apps::Deploy::DeployConfig::ProcessDescription

Inherits:
Object
  • Object
show all
Defined in:
lib/brut/cli/apps/deploy/deploy_config.rb

Overview

Describes a process you wish to run in production.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, cmd:) ⇒ ProcessDescription

Returns a new instance of ProcessDescription.



52
53
54
55
# File 'lib/brut/cli/apps/deploy/deploy_config.rb', line 52

def initialize(name:, cmd:)
  @name = name
  @cmd = Array(cmd)
end

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd.



50
51
52
# File 'lib/brut/cli/apps/deploy/deploy_config.rb', line 50

def cmd
  @cmd
end

#nameObject (readonly)

Returns the value of attribute name.



50
51
52
# File 'lib/brut/cli/apps/deploy/deploy_config.rb', line 50

def name
  @name
end

Instance Method Details

#cmd_directiveObject



57
58
59
# File 'lib/brut/cli/apps/deploy/deploy_config.rb', line 57

def cmd_directive
  "CMD [ " + @cmd.map { "\"#{it}\"" }.join(", ") + " ]"
end