Sha256: c0c500035bcb7bd1b4225c231e6522c7d817799575624ebc315a98cd91973e00

Contents?: true

Size: 302 Bytes

Versions: 2

Compression:

Stored size: 302 Bytes

Contents

class PgExport
  module Interactive
    module ColourableString
      refine String do
        def red
          "\e[31m#{self}\e[0m"
        end

        def green
          "\e[0;32;49m#{self}\e[0m"
        end

        def gray
          "\e[37m#{self}\e[0m"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pg_export-0.4.1 lib/pg_export/interactive/refinements/colourable_string.rb
pg_export-0.4.0 lib/pg_export/interactive/refinements/colourable_string.rb