Sha256: 469b93ef8064e1060482525582f62db941b21383d2f5b4668e29aba5868b3ea0

Contents?: true

Size: 307 Bytes

Versions: 1

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

require 'term/ansicolor'

module Pain
  module ColorStrings
    refine String do
      Term::ANSIColor.public_instance_methods.each do |method|
        define_method(method) do |*args|
          Term::ANSIColor.send(method, *args).to_s
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pain-0.2.0 lib/pain/color_strings.rb