lib/rbbt/tsv/accessor.rb in rbbt-util-5.14.34 vs lib/rbbt/tsv/accessor.rb in rbbt-util-5.14.35
- old
+ new
@@ -600,9 +600,19 @@
rescue
end
peek
end
+ def head(times=10)
+ stream = dumper_stream
+ str = ""
+ times.times do |i|
+ break if stream.eof?
+ str << stream.gets
+ end
+ str
+ end
+
def summary
key = nil
values = nil
self.each do |k, v|