class SuperDiff::RSpec::MatcherTextTemplate::ColorizedText
Attributes
color[R]
Public Class Methods
new(color, *args, &block)
click to toggle source
Calls superclass method
SuperDiff::RSpec::MatcherTextTemplate::Text::new
# File lib/super_diff/rspec/matcher_text_template.rb, line 147 def initialize(color, *args, &block) super(*args, &block) @color = color end
Public Instance Methods
length()
click to toggle source
# File lib/super_diff/rspec/matcher_text_template.rb, line 157 def length evaluate.to_s.length end
to_s()
click to toggle source
# File lib/super_diff/rspec/matcher_text_template.rb, line 153 def to_s colorizer.wrap(evaluate.to_s, color) end
Private Instance Methods
colorizer()
click to toggle source
# File lib/super_diff/rspec/matcher_text_template.rb, line 165 def colorizer ::RSpec::Core::Formatters::ConsoleCodes end