Class: Smartguard::Process
- Inherits:
-
Object
- Object
- Smartguard::Process
- Includes:
- DRb::DRbUndumped
- Defined in:
- lib/smartguard/process.rb
Direct Known Subclasses
Applications::Smartkiosk::Scheduler, Applications::Smartkiosk::Sidekiq, Applications::Smartkiosk::Smartware, Applications::Smartkiosk::Web
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
Instance Method Summary collapse
- #active? ⇒ Boolean
-
#initialize(path) ⇒ Process
constructor
A new instance of Process.
- #start ⇒ Object
- #stop ⇒ Object
- #wanted? ⇒ Boolean
Constructor Details
#initialize(path) ⇒ Process
Returns a new instance of Process.
8 9 10 11 12 13 14 |
# File 'lib/smartguard/process.rb', line 8 def initialize(path) @active = false @pid = nil @path = path @wanted = false @starting = false end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
6 7 8 |
# File 'lib/smartguard/process.rb', line 6 def path @path end |
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
5 6 7 |
# File 'lib/smartguard/process.rb', line 5 def pid @pid end |
Instance Method Details
#active? ⇒ Boolean
43 44 45 |
# File 'lib/smartguard/process.rb', line 43 def active? @active end |
#start ⇒ Object
35 36 37 |
# File 'lib/smartguard/process.rb', line 35 def start @wanted = true end |
#stop ⇒ Object
39 40 41 |
# File 'lib/smartguard/process.rb', line 39 def stop @wanted = false end |
#wanted? ⇒ Boolean
47 48 49 |
# File 'lib/smartguard/process.rb', line 47 def wanted? @wanted end |