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.
242 243 244 245 246 |
# File 'lib/pushy_client.rb', line 242 def initialize(client) @client = client @expiration_time = client.file_dir_expiry @file_dir = client.file_dir end |
Instance Method Details
#start ⇒ Object
248 249 250 |
# File 'lib/pushy_client.rb', line 248 def start @thread = Thread.new { expiration_loop } end |
#stop ⇒ Object
252 253 254 |
# File 'lib/pushy_client.rb', line 252 def stop @thread.kill end |