Sha256: 36eed2db4a6fa1fbfc929393aa9d2eff9721815dcce49d4b3ae1295765b73ee2

Contents?: true

Size: 947 Bytes

Versions: 11

Compression:

Stored size: 947 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 faint
          Rainbow(self).faint
        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

11 entries across 11 versions & 4 rubygems

Version Path
dirwatch-0.0.9 vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
dirwatch-0.0.8 vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
pract6-0.1.0 .gem/ruby/2.3.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
dirwatch-0.0.6 vendor/bundle/ruby/2.3.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
dirwatch-0.0.5 vendor/bundle/ruby/2.3.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
dirwatch-0.0.4 vendor/bundle/ruby/2.3.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
dirwatch-0.0.3 vendor/bundle/ruby/2.3.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb
rainbow-2.2.2 lib/rainbow/ext/string.rb