Class: Pkgr::Process
- Inherits:
-
Object
- Object
- Pkgr::Process
- Defined in:
- lib/pkgr/process.rb
Constant Summary collapse
- DAEMON_PROCESSES =
["web", "worker"]
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#scale ⇒ Object
Returns the value of attribute scale.
Instance Method Summary collapse
- #daemon? ⇒ Boolean
-
#initialize(name, command, scale = 1) ⇒ Process
constructor
A new instance of Process.
Constructor Details
#initialize(name, command, scale = 1) ⇒ Process
Returns a new instance of Process.
8 9 10 11 12 |
# File 'lib/pkgr/process.rb', line 8 def initialize(name, command, scale = 1) @name = name @command = command @scale = scale || 1 end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'lib/pkgr/process.rb', line 5 def command @command end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/pkgr/process.rb', line 5 def name @name end |
#scale ⇒ Object
Returns the value of attribute scale.
6 7 8 |
# File 'lib/pkgr/process.rb', line 6 def scale @scale end |
Instance Method Details
#daemon? ⇒ Boolean
14 15 16 |
# File 'lib/pkgr/process.rb', line 14 def daemon? DAEMON_PROCESSES.include?(name) end |