Sha256: d5c10e1d7a18c11d8b4bf3f065a8dd888a92f030b6ff47f7c835afec6a7fc6e8
Contents?: true
Size: 651 Bytes
Versions: 1
Compression:
Stored size: 651 Bytes
Contents
module Gorillib module Model module LoadLines extend Gorillib::Concern module ClassMethods # Iterate a block over each line of a file # @yield each line in the file. def _each_raw_line(filename, options={}) filename = Pathname.path_to(filename) # pop_headers = options.delete(:pop_headers) # File.open(filename) do |file| file.readline if pop_headers file.each do |line| line.chomp! ; next if line.empty? yield line end nil end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gorillib-0.5.0 | lib/gorillib/model/serialization/lines.rb |