Class Foreman::Procfile
In: lib/foreman/procfile.rb
Parent: Object

Reads and writes Procfiles

A valid Procfile entry is captured by this regex:

  /^([A-Za-z0-9_]+):\s*(.+)$/

All other lines are ignored.

Methods

[]   []=   delete   entries   load   new   save   to_s  

Public Class methods

Initialize a Procfile

@param [String] filename (nil) An optional filename to read from

Public Instance methods

Retrieve a Procfile command by name

@param [String] name The name of the Procfile entry to retrieve

Create a Procfile entry

@param [String] name The name of the Procfile entry to create @param [String] command The command of the Procfile entry to create

Remove a Procfile entry

@param [String] name The name of the Procfile entry to remove

Load a Procfile from a file

@param [String] filename The filename of the Procfile to load

Save a Procfile to a file

@param [String] filename Save the Procfile to this file

Get the Procfile as a String

[Validate]