Class: File
- Inherits:
-
Object
- Object
- File
- Defined in:
- lib/io-segmenter/core_ext/file.rb
Class Method Summary collapse
Class Method Details
.each_segment(file, *args, &block) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/io-segmenter/core_ext/file.rb', line 2 def self.each_segment(file, *args, &block) handle = open(file, 'rb') IOSegmenter.new(handle, *args).each(&block) ensure handle && handle.close end |