Class: Easymon::SemaphoreCheck
- Inherits:
-
Object
- Object
- Easymon::SemaphoreCheck
- Defined in:
- lib/easymon/checks/semaphore_check.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#file_name ⇒ Object
Returns the value of attribute file_name.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(file_name) ⇒ SemaphoreCheck
constructor
A new instance of SemaphoreCheck.
Constructor Details
#initialize(file_name) ⇒ SemaphoreCheck
Returns a new instance of SemaphoreCheck.
5 6 7 |
# File 'lib/easymon/checks/semaphore_check.rb', line 5 def initialize(file_name) self.file_name = file_name end |
Instance Attribute Details
#file_name ⇒ Object
Returns the value of attribute file_name.
3 4 5 |
# File 'lib/easymon/checks/semaphore_check.rb', line 3 def file_name @file_name end |
Instance Method Details
#check ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/easymon/checks/semaphore_check.rb', line 9 def check check_status = semaphore_exists? if check_status = "#{file_name} is in place!" else = "#{file_name} does not exist!" end [check_status, ] end |