Class: Fixnames::Debug::Color

Inherits:
Object
  • Object
show all
Extended by:
Term::ANSIColor
Defined in:
lib/fixnames/debug.rb

Class Method Summary collapse

Class Method Details

.prefix(chr, cname) ⇒ Object



8
9
10
11
# File 'lib/fixnames/debug.rb', line 8

def self.prefix(chr, cname)
  #raise "#{cname.inspect}, #{send(cname).inspect}"
  [Color.send(cname), Color.bold, "#{chr}#{chr}>", Color.clear].join
end

.puts_msg(str, chr, cname) ⇒ Object



13
14
15
# File 'lib/fixnames/debug.rb', line 13

def self.puts_msg(str, chr, cname)
  puts "#{prefix(chr, cname)} #{str}"
end