vendor/gems/BlueCloth-1.0.0/utils.rb
# Create a string that contains the ANSI codes specified and return it
Create a string that contains the ANSI codes specified and return it
Create a string that contains the ANSI codes specified and return it
def ansiCode( *attributes )
		return '' unless /(?:vt10[03]|xterm(?:-color)?|linux)/i =~ ENV['TERM']
		attr = attributes.collect {|a| AnsiAttributes[a] ? AnsiAttributes[a] : nil}.compact.join(';')
		if attr.empty? 
			return ''
		else
			return "\e[%sm" % attr
		end
	end
def ansiCode ( * attributes ) return '' unless / (?:vt10[03]|xterm(?:-color)?|linux) /i =~ ENV [ 'TERM' ] attr = attributes . collect { | a | AnsiAttributes [ a ] ? AnsiAttributes [ a ] : nil } . compact . join ( ';' ) if attr . empty? return '' else return "\e[%sm" % attr end end
Create a string that contains the ANSI codes specified and return it
Create a string that contains the ANSI codes specified and return it
attributes
<not_specific>