Sha256: 56fd44f47925fc8d7d779ac8bfd1251ede447a9305cf71b62dd681f8b5ad6899

Contents?: true

Size: 258 Bytes

Versions: 22

Compression:

Stored size: 258 Bytes

Contents

require 'term/ansicolor'

module Matest
  module Color
    module_function

    Term::ANSIColor.attributes.each do |attr|
      define_method(attr) do |str|
        Matest::Configure.color? ? Term::ANSIColor.send(attr, str) : str
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
matest-1.7.4 lib/matest/color.rb
matest-1.7.3 lib/matest/color.rb
matest-1.7.2 lib/matest/color.rb
matest-1.7.1 lib/matest/color.rb
matest-1.7.0 lib/matest/color.rb
matest-1.6.9 lib/matest/color.rb
matest-1.6.6 lib/matest/color.rb
matest-1.6.5 lib/matest/color.rb
matest-1.6.4 lib/matest/color.rb
matest-1.6.3 lib/matest/color.rb
matest-1.6.2 lib/matest/color.rb
matest-1.6.1 lib/matest/color.rb
matest-1.6.0 lib/matest/color.rb
matest-1.5.6 lib/matest/color.rb
matest-1.5.5 lib/matest/color.rb
matest-1.5.4 lib/matest/color.rb
matest-1.5.3 lib/matest/color.rb
matest-1.5.2 lib/matest/color.rb
matest-1.5.1 lib/matest/color.rb
matest-1.5.0 lib/matest/color.rb