Class: Fig::Logging::Colorizable
- Inherits:
-
String
- Object
- String
- Fig::Logging::Colorizable
- Defined in:
- lib/fig/logging/colorizable.rb
Overview
A String that has colors associated with it.
Instance Attribute Summary collapse
-
#background ⇒ Object
readonly
Returns the value of attribute background.
-
#foreground ⇒ Object
readonly
Returns the value of attribute foreground.
Instance Method Summary collapse
-
#initialize(string = '', foreground = nil, background = nil) ⇒ Colorizable
constructor
A new instance of Colorizable.
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
#background ⇒ Object (readonly)
Returns the value of attribute background.
8 9 10 |
# File 'lib/fig/logging/colorizable.rb', line 8 def background @background end |
#foreground ⇒ Object (readonly)
Returns the value of attribute foreground.
8 9 10 |
# File 'lib/fig/logging/colorizable.rb', line 8 def foreground @foreground end |