Class: Test::Unit::MixColor
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/test/unit/color.rb |
Class Method Summary
- .new(colors) ⇒ MixColor constructor
Instance Attribute Summary
- #colors readonly
Instance Method Summary
Constructor Details
.new(colors) ⇒ MixColor
Instance Attribute Details
#colors (readonly)
[ GitHub ]# File 'lib/test/unit/color.rb', line 110
attr_reader :colors
Instance Method Details
#+(other)
[ GitHub ]# File 'lib/test/unit/color.rb', line 125
def +(other) self.class.new([self, other]) end
#==(other)
[ GitHub ]#escape_sequence
[ GitHub ]# File 'lib/test/unit/color.rb', line 121
def escape_sequence "\e[#{sequence.join(';')}m" end
#sequence
[ GitHub ]# File 'lib/test/unit/color.rb', line 115
def sequence @colors.inject([]) do |result, color| result + color.sequence end end