Module: Stupidedi::Color

Included in:
Values::AbstractVal
Defined in:
lib/stupidedi/color.rb

Defined Under Namespace

Modules: Stub Classes: Wrapper

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.ansiObject



7
8
9
10
11
12
13
14
# File 'lib/stupidedi/color.rb', line 7

def self.ansi
  @__ansi ||=
    if defined?(::Term::ANSIColor)
      Wrapper.new(::Term::ANSIColor)
    else
      Wrapper.new(Stub)
    end
end

Instance Method Details

#ansiObject



16
17
18
# File 'lib/stupidedi/color.rb', line 16

def ansi
  Color.ansi
end