Class: PumaBacklogDetector::FlagFile
- Inherits:
-
Object
- Object
- PumaBacklogDetector::FlagFile
- Defined in:
- lib/puma_backlog_detector.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ FlagFile
constructor
A new instance of FlagFile.
- #set(value) ⇒ Object
Constructor Details
#initialize(path) ⇒ FlagFile
Returns a new instance of FlagFile.
56 57 58 59 60 |
# File 'lib/puma_backlog_detector.rb', line 56 def initialize path @path = path @exists = File.exists? path set false end |
Instance Method Details
#set(value) ⇒ Object
62 63 64 65 66 67 |
# File 'lib/puma_backlog_detector.rb', line 62 def set value if @exists != value FileUtils.send((value ? :touch : :rm_f), @path) @exists = value end end |