Sha256: ce82729a34bd3f994b8bfb2c37d0df85b50f576859832fd04fb1327888bb79cd

Contents?: true

Size: 886 Bytes

Versions: 7

Compression:

Stored size: 886 Bytes

Contents

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)

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rainbow-2.2.1 lib/rainbow/ext/string.rb
rainbow-2.1.0 lib/rainbow/ext/string.rb
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/ext/string.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/rainbow-2.0.0/lib/rainbow/ext/string.rb
rainbow-2.0.0 lib/rainbow/ext/string.rb
rainbow-1.99.2 lib/rainbow/ext/string.rb
rainbow-1.99.1 lib/rainbow/ext/string.rb