module IRB
def easter_egg(type = nil)
def easter_egg(type = nil) |= [:logo, :dancing].sample ype logo .open(File.join(__dir__, 'ruby_logo.aa')) do |f| quire "rdoc" oc::RI::Driver.new.page do |io| IO.copy_stream(f, io) d dancing n nvas = Canvas.new(Reline.get_screen_size) line::IOGate.set_winch_handler do canvas = Canvas.new(Reline.get_screen_size) d by_model = RubyModel.new int "\e[?1049h" step do |i| # TODO (0..).each needs Ruby 2.6 or later buff = canvas.draw do ruby_model.render_frame(i) do |p1, p2| canvas.line(p1, p2) end end buff[0, 20] = "\e[0mPress Ctrl+C to stop\e[31m\e[1m" print "\e[H" + buff sleep 0.05 d ue Interrupt re int "\e[0m\e[?1049l"