Class: Gherkin::Formatter::PrettyFormatter::ColorFormat
- Inherits:
-
Object
- Object
- Gherkin::Formatter::PrettyFormatter::ColorFormat
- Includes:
- AnsiEscapes
- Defined in:
- lib/gherkin/formatter/pretty_formatter.rb
Constant Summary
Constants included from AnsiEscapes
AnsiEscapes::ALIASES, AnsiEscapes::COLORS
Instance Method Summary collapse
-
#initialize(status) ⇒ ColorFormat
constructor
A new instance of ColorFormat.
- #text(text) ⇒ Object
Methods included from AnsiEscapes
Constructor Details
#initialize(status) ⇒ ColorFormat
Returns a new instance of ColorFormat.
127 128 129 |
# File 'lib/gherkin/formatter/pretty_formatter.rb', line 127 def initialize(status) @status = status end |
Instance Method Details
#text(text) ⇒ Object
131 132 133 |
# File 'lib/gherkin/formatter/pretty_formatter.rb', line 131 def text(text) self.__send__(@status) + text + reset end |