class Test::Unit::MixColor

属性

colors[R]

公共类方法

new(colors) 点击切换源码
# File test-unit-3.6.7/lib/test/unit/color.rb, line 111
def initialize(colors)
  @colors = colors
end

公共实例方法

+(other) 点击切换源码
# File test-unit-3.6.7/lib/test/unit/color.rb, line 125
def +(other)
  self.class.new([self, other])
end
==(other) 点击切换源码
# File test-unit-3.6.7/lib/test/unit/color.rb, line 129
def ==(other)
  self.class === other and colors == other.colors
end
escape_sequence() 点击切换源码
# File test-unit-3.6.7/lib/test/unit/color.rb, line 121
def escape_sequence
  "\e[#{sequence.join(';')}m"
end
sequence() 点击切换源码
# File test-unit-3.6.7/lib/test/unit/color.rb, line 115
def sequence
  @colors.inject([]) do |result, color|
    result + color.sequence
  end
end