class Threeman::Procfile
Public Instance Methods
commands(workdir, port, command_prefix, formation)
click to toggle source
# File lib/threeman/procfile.rb, line 6 def commands(workdir, port, command_prefix, formation) commands = [] entries do |name, command| count = formation[name] command_with_prefix = [command_prefix, command].compact.join(' ') (0...count).each do |index| commands << Threeman::Command.new(name, command_with_prefix, workdir, port + index) end end commands end