Class: Schlepp::Sink::Filter::Chunker
- Inherits:
-
Object
- Object
- Schlepp::Sink::Filter::Chunker
- Defined in:
- lib/schlepp/sink/filter/chunker.rb
Defined Under Namespace
Classes: Builder
Instance Method Summary collapse
- #extension ⇒ Object
-
#initialize(opts = {}) ⇒ Chunker
constructor
A new instance of Chunker.
- #rotate ⇒ Object
- #should_rotate? ⇒ Boolean
- #writer ⇒ Object
Constructor Details
Instance Method Details
#extension ⇒ Object
22 23 24 |
# File 'lib/schlepp/sink/filter/chunker.rb', line 22 def extension @chunk.to_s end |
#rotate ⇒ Object
30 31 32 |
# File 'lib/schlepp/sink/filter/chunker.rb', line 30 def rotate @chunk += 1 end |
#should_rotate? ⇒ Boolean
26 27 28 |
# File 'lib/schlepp/sink/filter/chunker.rb', line 26 def should_rotate? @observer.count > @chunk_size end |