Sha256: 3781b3eb7bfbb1828628faf9a4b4d2e416c0f1a02af020737626c7e765adb268

Contents?: true

Size: 408 Bytes

Versions: 10

Compression:

Stored size: 408 Bytes

Contents

# encoding: utf-8

begin
  require "term/ansicolor"
rescue LoadError
  raise LoadError, "You have to install term-ansicolor gem!"
end

String.send(:include, Term::ANSIColor) # just for now, I know it's a mess

module Term::ANSIColor
  def self.coloring?
    if @coloring.respond_to?(:call)
      @coloring.call
    else
      @coloring
    end
  end
end


Term::ANSIColor.coloring = lambda { Nake.coloring }

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
nake-0.1.1 lib/nake/colors.rb
nake-0.1 lib/nake/colors.rb
nake-0.0.9.5 lib/nake/colors.rb
nake-0.0.9.4 lib/nake/colors.rb
nake-0.0.9.3 lib/nake/colors.rb
nake-0.0.9.2 lib/nake/colors.rb
nake-0.0.9.pre lib/nake/colors.rb
do_riak-0.10.1.pre gems/gems/nake-0.0.8/lib/nake/colors.rb
nake-0.0.8.pre lib/nake/colors.rb
nake-0.0.8 lib/nake/colors.rb