Class: OggEncode::SizedPsHash
- Inherits:
-
Hash
- Object
- Hash
- OggEncode::SizedPsHash
- Defined in:
- lib/autogg/utils.rb
Instance Method Summary collapse
-
#initialize(max) ⇒ SizedPsHash
constructor
A new instance of SizedPsHash.
- #store(pid, path, &block) ⇒ Object
Constructor Details
#initialize(max) ⇒ SizedPsHash
Returns a new instance of SizedPsHash.
18 19 20 21 |
# File 'lib/autogg/utils.rb', line 18 def initialize( max ) @max = max super end |
Instance Method Details
#store(pid, path, &block) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/autogg/utils.rb', line 23 def store( pid, path, &block ) while size >= @max pid = Process.wait delete( pid ) end ps = block.call super( ps.pid, path ) end |