Class: Fig::Logging::Colorizable

Inherits:
String
  • Object
show all
Defined in:
lib/fig/logging/colorizable.rb

Overview

A String that has colors associated with it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string = '', foreground = nil, background = nil) ⇒ Colorizable

Returns a new instance of Colorizable.


10
11
12
13
14
15
# File 'lib/fig/logging/colorizable.rb', line 10

def initialize(string = '', foreground = nil, background = nil)
  super(string)

  @foreground = foreground
  @background = background
end

Instance Attribute Details

#backgroundObject (readonly)

Returns the value of attribute background


8
9
10
# File 'lib/fig/logging/colorizable.rb', line 8

def background
  @background
end

#foregroundObject (readonly)

Returns the value of attribute foreground


8
9
10
# File 'lib/fig/logging/colorizable.rb', line 8

def foreground
  @foreground
end