Method: Rubcask::DataFile#each
- Defined in:
- lib/rubcask/data_file.rb
#each {|data_entry| ... } ⇒ Enumerator
Note:
Calling this method might change ‘pos` of the `file`
yields each entry in the file
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/rubcask/data_file.rb', line 54 def each return to_enum(__method__) unless block_given? seek(0) loop do val = read break unless val yield val end end |