Class: Gherkin::Formatter::PrettyFormatter::ColorFormat

Inherits:
Object
  • Object
show all
Includes:
AnsiEscapes
Defined in:
lib/gherkin/formatter/pretty_formatter.rb

Constant Summary

Constants included from AnsiEscapes

AnsiEscapes::ALIASES, AnsiEscapes::COLORS

Instance Method Summary collapse

Methods included from AnsiEscapes

#reset, #up

Constructor Details

#initialize(status) ⇒ ColorFormat

Returns a new instance of ColorFormat.



128
129
130
# File 'lib/gherkin/formatter/pretty_formatter.rb', line 128

def initialize(status)
  @status = status
end

Instance Method Details

#text(text) ⇒ Object



132
133
134
# File 'lib/gherkin/formatter/pretty_formatter.rb', line 132

def text(text)
  self.__send__(@status) + text + reset
end