Sha256: 99319e90a21ee20e8ef819983c1ea5521212793a11eb62391cd9bb86392c8691
Contents?: true
Size: 423 Bytes
Versions: 18
Compression:
Stored size: 423 Bytes
Contents
# Many importers use this as a standard. This works like a wrapper for any # IO object with a couple extra methods added. class Tracksperanto::ExtIO < DelegateClass(IO) def initialize(with) __setobj__ with end def gets_and_strip s = gets s ? s.strip : nil end def gets_non_empty line = gets return nil if line.nil? s = line.strip return gets_non_empty if s.empty? s end end
Version data entries
18 entries across 18 versions & 1 rubygems