quran-json/binlib/io/line.rb
2022-07-16 16:19:50 -03:00

25 lines
335 B
Ruby

# frozen_string_literal: true
class IO::Line
require "io/console"
attr_reader :io
def initialize(io)
@io = io
end
def print(*strs)
tap { @io.print(strs.join.gsub($/, "")) }
end
def end
tap { @io.print($/) }
end
def rewind
tap do
@io.erase_line(2)
@io.goto_column(0)
end
end
end