Sha256: a88262e009d466550d4e4834b6af22ac3368a37b6ef9994421ca16fb429fcf67
Contents?: true
Size: 444 Bytes
Versions: 24
Compression:
Stored size: 444 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 = __getobj__.gets s ? s.strip : nil end def gets_non_empty line = __getobj__.gets return nil if line.nil? s = line.strip return gets_non_empty if s.empty? s end end
Version data entries
24 entries across 24 versions & 1 rubygems