Sha256: e8128e05e9e8c22ea1f03177880c61b3ee71e2f09bf6bd8e4391099a1d778dfd
Contents?: true
Size: 578 Bytes
Versions: 24
Compression:
Stored size: 578 Bytes
Contents
module Infobar::InputOutput def newline display.newline self end def clear display.clear self end %i[ print printf putc puts ].each do |method| define_method(method) do |*a, &b| display.clear if display.output.respond_to?(method) display.output.public_send(method, *a, &b) end end end %i[ gets readline readlines ].each do |method| define_method(method) do |*a, &b| display.clear if display.input.respond_to?(method) display.input.public_send(method, *a, &b) end end end end
Version data entries
24 entries across 24 versions & 1 rubygems