module Termiro

Constants

COLORS
VERSION

Public Class Methods

draw(file) click to toggle source
# File lib/termiro.rb, line 15
def self.draw(file)
  graphic = ""
  lines= File.readlines("graphics/#{file}.txt")
  lines.each do |line|
    line.each_char do |color|
      if color == '-' # if character not int colors
        graphic += ' '
      else
        graphic += COLORS[color.to_sym].to_s
      end
    end
    graphic += "\n"
  end
  puts graphic
end