Sha256: 29b27d8bc190772d5cc278b0efa2a5da4821b771522073b4dd3eace723a920d0
Contents?: true
Size: 672 Bytes
Versions: 11
Compression:
Stored size: 672 Bytes
Contents
require 'smart_colored' require 'smart_colored/extend' module Rake::Funnel::Extensions module DisableColors def self.included(klass) original_apply_format = klass.instance_method(:apply_format) define_method(:apply_format) do |format| return self unless $stdout.tty? bind_to = self bind_to = SmartColored::String.new(self) if klass == SmartColored::String original_apply_format.bind(bind_to).call(format) end end end end class SmartColored::String include Rake::Funnel::Extensions::DisableColors end class String include Rake::Funnel::Extensions::DisableColors end
Version data entries
11 entries across 11 versions & 1 rubygems