INNER CODE UNIT · Ruby

self

busyloop/lolcat · lib/lolcat/lol.rb:115

  def self.set_mode(truecolor)
    # @paint_mode_detected = Paint.mode
    @paint_mode_detected = %w[truecolor 24bit].include?(ENV['COLORTERM']) ? 0xffffff : 256
    Paint.mode = truecolor ? 0xffffff : @paint_mode_detected
    STDERR.puts "DEBUG: Paint.mode = #{Paint.mode} (detected: #{@paint_mode_detected})" if ENV['LOLCAT_DEBUG']
    @paint_init = true
  end
end

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…