method
colour
rspec latest stable - Class:
Spec::Runner::Formatter::BaseTextFormatter
colour(text, colour_code)protected
No documentation available.
# File lib/spec/runner/formatter/base_text_formatter.rb, line 112
def colour(text, colour_code)
return text if output_to_file?
return text unless ENV['RSPEC_COLOR'] || (colour? & (autospec? || output_to_tty?))
"#{colour_code}#{text}\e[0m"
end