All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gems.rainbow-2.0.0.lib.rainbow.ext.string.rb Maven / Gradle / Ivy

There is a newer version: 3.7.2
Show newest version
require 'rainbow'

module Rainbow
  module Ext
    module String
      module InstanceMethods

        def foreground(*color)
          Rainbow(self).foreground(*color)
        end

        alias_method :color, :foreground
        alias_method :colour, :foreground

        def background(*color)
          Rainbow(self).background(*color)
        end

        def reset
          Rainbow(self).reset
        end

        def bright
          Rainbow(self).bright
        end

        def italic
          Rainbow(self).italic
        end

        def underline
          Rainbow(self).underline
        end

        def blink
          Rainbow(self).blink
        end

        def inverse
          Rainbow(self).inverse
        end

        def hide
          Rainbow(self).hide
        end

      end
    end
  end
end

::String.send(:include, Rainbow::Ext::String::InstanceMethods)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy