Class: PushyClient::FileDirCleaner
- Inherits:
-
Object
- Object
- PushyClient::FileDirCleaner
- Defined in:
- lib/pushy_client.rb
Overview
XXX Should go in a separate file
Instance Method Summary collapse
-
#initialize(client) ⇒ FileDirCleaner
constructor
A new instance of FileDirCleaner.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(client) ⇒ FileDirCleaner
Returns a new instance of FileDirCleaner.
280 281 282 283 284 |
# File 'lib/pushy_client.rb', line 280 def initialize(client) @client = client @expiration_time = client.file_dir_expiry @file_dir = client.file_dir end |
Instance Method Details
#start ⇒ Object
286 287 288 |
# File 'lib/pushy_client.rb', line 286 def start @thread = Thread.new { expiration_loop } end |
#stop ⇒ Object
290 291 292 |
# File 'lib/pushy_client.rb', line 290 def stop @thread.kill end |