Class: DeepStore::Sweeper
- Inherits:
-
Object
- Object
- DeepStore::Sweeper
- Defined in:
- lib/deep_store/sweeper.rb
Instance Attribute Summary collapse
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
Class Method Summary collapse
Instance Method Summary collapse
- #call(_object_id) ⇒ Object
- #finalize ⇒ Object
-
#initialize(stream) ⇒ Sweeper
constructor
A new instance of Sweeper.
Constructor Details
#initialize(stream) ⇒ Sweeper
Returns a new instance of Sweeper.
11 12 13 |
# File 'lib/deep_store/sweeper.rb', line 11 def initialize(stream) @stream = stream end |
Instance Attribute Details
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
3 4 5 |
# File 'lib/deep_store/sweeper.rb', line 3 def stream @stream end |
Class Method Details
Instance Method Details
#call(_object_id) ⇒ Object
15 16 17 |
# File 'lib/deep_store/sweeper.rb', line 15 def call(_object_id) finalize end |
#finalize ⇒ Object
19 20 21 22 |
# File 'lib/deep_store/sweeper.rb', line 19 def finalize stream.close if stream.respond_to?(:close) stream.unlink if stream.respond_to?(:unlink) end |