class ProcfileSplit::Procfile
Public Class Methods
create_procfile(file, process, command)
click to toggle source
# File lib/procfile_split/procfile.rb, line 14 def self.create_procfile(file, process, command) procfile_line = "#{process}: #{command}" File.open(file, 'w') do |f| f.write(procfile_line) end end
processes(procfile)
click to toggle source
# File lib/procfile_split/procfile.rb, line 3 def self.processes(procfile) lines = procfile.split("\n") lines.inject({}) do |map, line| name, command = line.split(":") if name && command map[name] = command.strip end map end end